When using utils/build-script -r --cross-compile-hosts iphoneos-arm64
it compiles the host target (osx), then starts building the target and stop with the error:
swift-source/llvm/lib/Support/PrettyStackTrace.cpp:43:8: error: thread-local storage is not supported for the current target
static LLVM_THREAD_LOCAL PrettyStackTraceEntry *PrettyStackTraceHead = nullptr;
^
swift-source/llvm/include/llvm/Support/Compiler.h:488:27: note: expanded from macro 'LLVM_THREAD_LOCAL'
#define LLVM_THREAD_LOCAL __thread
update:
after adding -DLLVM_ENABLE_THREADS=OFF
, clang fails to build.
I tried to build current master and swift-4.2-RELEASE
tag. I found this old thread Cross compiling for iphoneos (armv7) but without an answer. So... should cross-compiling work with the public codebase?