[PATCH] D42286: [libfuzzer] Don't try to build tests with the just built compiler unless it's usable.
Don Hinton via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 11:51:52 PST 2018
hintonda added a comment.
In https://reviews.llvm.org/D42286#982173, @phosek wrote:
> I don't think this is correct, compiling libFuzzer should be unrelated to whether we can execute tests or not. Your just built compiler should be capable of targeting Linux if that's your target platform.
The problem here is that you are using the just built compiler, which may not run on the host if you are cross-compiling. If you take a look at the implementation of `add_custom_libcxx`, you'll see that it uses the just-built compiler -- `-DCMAKE_CXX_COMPILER=${COMPILER_RT_TEST_CXX_COMPILER}`.
In my case:
CMAKE_HOST_SYSTEM_NAME=Darwin
CMAKE_SYSTEM_NAME=Linux
With the just built compiler built like this: `--target=x86_64-unknown-linux-gnu`, so it won't run on Darwin.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D42286
More information about the llvm-commits
mailing list