[PATCH] D31098: [compiler-rt] respect CMAKE_EXE_LINKER_FLAGS in compiler and library tests

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 13:38:40 PDT 2017


inglorion added a comment.

Some more background on this change:

I tried to build clang with lld and LTO on Linux. The build spit out a lot of warnings about non-virtual destructors and a bunch of errors like undefined reference to dlsym. This turned out to be because we were not passing flags that we were supposed to be passing. The parts of config-ix.cmake that are supposed to be testing for these flags were all failing, because they try to produce executables with the flag, and if that fails, we conclude that the compiler or linker does not support that flag. In my case, we failed to create executables because we were trying to link object files created with -flto with a linker that doesn't support LLVM bitcode - despite the build using LLVM_USE_LINKER=lld. So we would conclude that things like -Wno-non-virtual-dtor and -ldl are not supported, not pass those flags, and fail the build.


https://reviews.llvm.org/D31098





More information about the llvm-commits mailing list