[llvm] r247308 - [CMake] Add DARWIN_LTO_LIBRARY option to allow overriding -lto_library.
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 10:28:51 PDT 2015
Author: cbieneman
Date: Thu Sep 10 12:28:51 2015
New Revision: 247308
URL: http://llvm.org/viewvc/llvm-project?rev=247308&view=rev
Log:
[CMake] Add DARWIN_LTO_LIBRARY option to allow overriding -lto_library.
Modified:
llvm/trunk/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=247308&r1=247307&r2=247308&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Sep 10 12:28:51 2015
@@ -543,6 +543,13 @@ else(UNIX)
endif(NOT DEFINED CMAKE_INSTALL_RPATH)
endif()
+if(APPLE AND DARWIN_LTO_LIBRARY)
+ set(CMAKE_EXE_LINKER_FLAGS
+ "${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
+ set(CMAKE_SHARED_LINKER_FLAGS
+ "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
+endif()
+
# Work around a broken bfd ld behavior. When linking a binary with a
# foo.so library, it will try to find any library that foo.so uses and
# check its symbols. This is wasteful (the check was done when foo.so
More information about the llvm-commits
mailing list