[CMake] [Darwin] Need to set lto_library on CMAKE_MODULE_LINKER_FLAGS as well
authorChris Bieneman <beanz@apple.com>
Fri, 11 Sep 2015 18:39:19 +0000 (18:39 +0000)
committerChris Bieneman <beanz@apple.com>
Fri, 11 Sep 2015 18:39:19 +0000 (18:39 +0000)
This is a follow-on to r247308.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247443 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt

index 3e54ec9..3c7517e 100644 (file)
@@ -548,6 +548,8 @@ if(APPLE AND DARWIN_LTO_LIBRARY)
     "${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}")
+  set(CMAKE_MODULE_LINKER_FLAGS
+    "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
 endif()
 
 # Work around a broken bfd ld behavior. When linking a binary with a