[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
Mon Mar 20 14:34:12 PDT 2017


inglorion added inline comments.


================
Comment at: cmake/Modules/CompilerRTUtils.cmake:129
+  set(SAVED_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+  set(CMAKE_EXE_LINKER_FLAGS "")
   set(TARGET_${arch}_CFLAGS ${ARGN})
----------------
beanz wrote:
> Pretty sure this will actually change behavior. Look down below, we were reading this value and passing it through to the `try_compile` call.
Yes. It looks like the code we have in this function explicitly passes CMAKE_EXE_LINKER_FLAGS. I'm still running the tests, but it looks like just setting CMP0056 and removing that code makes things work like they're supposed to. New diff coming shortly.


https://reviews.llvm.org/D31098





More information about the llvm-commits mailing list