[llvm] r287256 - [CMake] Error when LTO and lld are enabled on Darwin
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 12:22:49 PST 2016
Author: phosek
Date: Thu Nov 17 14:22:49 2016
New Revision: 287256
URL: http://llvm.org/viewvc/llvm-project?rev=287256&view=rev
Log:
[CMake] Error when LTO and lld are enabled on Darwin
lld on Darwin does not currently support LTO.
Differential Revision: https://reviews.llvm.org/D26715
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=287256&r1=287255&r2=287256&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Thu Nov 17 14:22:49 2016
@@ -96,6 +96,9 @@ set(LTDL_SHLIB_EXT ${CMAKE_SHARED_LIBRAR
set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
if(APPLE)
+ if(LLVM_ENABLE_LLD AND LLVM_ENABLE_LTO)
+ message(FATAL_ERROR "lld does not support LTO on Darwin")
+ endif()
# Darwin-specific linker flags for loadable modules.
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
endif()
More information about the llvm-commits
mailing list