[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 16:06:54 PDT 2017


inglorion added inline comments.


================
Comment at: cmake/Modules/CompilerRTUtils.cmake:146
+      set(SAVED_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
+      set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${argstring}")
       try_compile(CAN_TARGET_${arch} ${CMAKE_BINARY_DIR} ${SIMPLE_SOURCE}
----------------
inglorion wrote:
> beanz wrote:
> > Yes, this is the right way to make this change. Can you make a similar change to `darwin_test_archs` in CompilerRTDarwinUtils.cmake?
> > 
> > It should be a mechanical transformation.
> Per @fjricci's comment on D31144, I think this patch already fixes the issue for them. Note that darwin_test_archs isn't currently explicitly passing in CMAKE_EXE_LINKER_FLAGS. D31144 would have done it, and this patch should accomplish the same effect by passing the flags implicitly because CMP0056 is NEW.
Ah, right. I had somehow missed that darwin_test_archs also overrides CMAKE_EXE_LINKER_FLAGS. @fjricci, does it work for you with this change to darwin_test_archs?


https://reviews.llvm.org/D31098





More information about the llvm-commits mailing list