From 107dca71fa0c616ace1fd34ace27baba69841bb9 Mon Sep 17 00:00:00 2001 From: cancel Date: Wed, 19 Dec 2018 23:45:46 +0900 Subject: [PATCH] Add special case for mac clang version number --- tool | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tool b/tool index 9870530..44f0c1e 100755 --- a/tool +++ b/tool @@ -125,7 +125,10 @@ cc_vers= lld_detected=0 if cc_vers=$(echo -e '#ifndef __clang__\n#error Not found\n#endif\n__clang_major__.__clang_minor__.__clang_patchlevel__' | "$cc_exe" -E -xc - 2>/dev/null | tail -n 1 | tr -d '\040'); then cc_id=clang - if [[ $os != mac ]]; then + # Mac clang/llvm doesn't say the real version of clang. Just assume it's 3.9.0 + if [[ $os == mac ]]; then + cc_vers=4.2.1 + else if command -v "lld" >/dev/null 2>&1; then lld_detected=1 fi