Llvm fails to build on MacOS prior to 10.12

Adrian,

Your recent commit
https://github.com/llvm-mirror/llvm/commit/e8c5427c
causes build failures for me locally on Mac OSX 10.11.6 using a stock (and I guess fairly old) Xcode Clang.

Is there any way to fix trunk so that your new code is #ifdef’ed out for versions of Clang that don’t support this bizarre __builtin_available(macos 10.12, *) syntax? Or maybe hide it behind a macro?

Thanks in advance,
Arthur

In file included from $ROOT/llvm/lib/Support/Path.cpp:1113:

$ROOT/llvm/lib/Support/Unix/Path.inc:1140:27: error: use of undeclared identifier ‘macos’; did you mean ‘acos’?

if (__builtin_available(macos 10.12, *)) {

*^~~~~*

acos

/usr/include/math.h:323:15: note: ‘acos’ declared here

extern double acos(double);

^

In file included from $ROOT/llvm/lib/Support/Path.cpp:1113:

$ROOT/llvm/lib/Support/Unix/Path.inc:1147:14: error: use of undeclared identifier 'COPYFILE_CLONE’

Flag = COPYFILE_CLONE;

^

2 errors generated.

Should be fixed by r360174.

-- adrian

Confirmed! Thanks for the super quick fix!