Fix cross build if COMPILER_RT_TEST_TARGET_ARCH is specified as a
different arch than LLVM_NATIVE_ARCH.
Details
- Reviewers
samsonov
Diff Detail
Event Timeline
What is the exact cmake invocation you're using, and what are the errors you see? ${COMPILER_RT_TEST_TARGET_ARCH} is supposed to be used, well, in testing. It probably shouldn't affect the set of architectures we're targeting.
cmake/config-ix.cmake | ||
---|---|---|
177 | This doesn't seem right - arch may be deduced to be i386 |
I share your concern about using COMPILER_RT_TEST_TARGET_ARCH, but unless I'm missing something that seems to be how the compiler-rt cmake build is set up.
For some background, I'm trying to build compiler-rt on x86_64-linux targeting aarch64-linux, with a toolchain that is configured to support both X86 and AArch64 targets.
Without my change, the compiler-rt cmake config thinks I'm trying to build for x86, no matter how I set up my compiler & flag cmake variables.
OK, we shouldn't really LLVM_NATIVE_ARCH either. I've submitted similar changes to this code in r247099, could you please check if they solve the problem for you?
This doesn't seem right - arch may be deduced to be i386