I just tried updating my clang build on a few machines, and it built fine on 10.11, but on a macOS 10.10 with AppleClang 7.0.2.7000181 I get this:
/Users/builder/llvm/llvm/projects/compiler-rt/lib/builtins/adddf3.c:28:53: error: alias unsupported on this file format
AEABI_RTABI double __aeabi_dadd(double a, double b) COMPILER_RT_ALIAS(__adddf3);
^
/Users/builder/llvm/llvm/projects/compiler-rt/lib/builtins/int_lib.h:29:36: note: expanded from macro 'COMPILER_RT_ALIAS' #define COMPILER_RT_ALIAS(aliasee) _Pragma("GCC error(\"alias unsupported on this file format\")")
^
<scratch space>:89:6: note: expanded from here
GCC error("alias unsupported on this file format")
^
I don't believe I'm specifying any target triple (I confess I don't exactly know what that is). I'm just doing a vanilla cmake & make on macOS 10.10 using Xcode 7.2.1's compiler & SDK. No cross compiling. Searching cmake's output for "triple" reveals this though: x86_64-apple-darwin14.5.0
One new data point: if I manually apply Akira's DISPATCH_NOESCAPE fix to r314850, that builds; but r314851 does not.
From off-list, got the compiler invocation. It looks like it's invoking clang from Xcode, and that clang has a bug where it incorrectly defines __ARM_EABI__ for -arch armv7em. (Not sure off the top of my head how old AppleClang 7 is.)
Should work if you build using a more recent version of clang. Or maybe you can work around the problem by commenting out the call to darwin_add_embedded_builtin_libraries() in compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake .
From off-list, got the compiler invocation. It looks like it's
invoking clang from Xcode, and that clang has a bug where it incorrectly
defines __ARM_EABI__ for -arch armv7em. (Not sure off the top of my
head how old AppleClang 7 is.)
Xcode 7.2.1 was released February 3, 2016. Not so old. It's the last/newest Xcode that supports running on OS X 10.10.
Should work if you build using a more recent version of clang.
I suppose one could get a clang/gcc from "somewhere" to bootstap clang ToT. But really my point is that using Xcode is the easiest way, and if the newest Xcode for that OS isn't supported, it's a much bigger pain.
Or maybe
you can work around the problem by commenting out the call to
darwin_add_embedded_builtin_libraries() in
compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake .
Confirmed. I can build r314851 if I comment out that line.