[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 15:41:26 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}
----------------
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.


https://reviews.llvm.org/D31098





More information about the llvm-commits mailing list