[llvm] r260703 - [CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 11:02:40 PST 2016
Author: hans
Date: Fri Feb 12 13:02:39 2016
New Revision: 260703
URL: http://llvm.org/viewvc/llvm-project?rev=260703&view=rev
Log:
[CMake] don't build libLTO when LLVM_ENABLE_PIC is OFF
When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while
linking shared library libLTO.so, because its dependencies are built
with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484.
This diff reverts r252652 (git 9fd4377ddb83aee3c049dc8757e7771edbb8ee71),
which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so.
Patch by Igor Sugak!
Differential Revision: http://reviews.llvm.org/D17049
Modified:
llvm/trunk/tools/CMakeLists.txt
Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=260703&r1=260702&r2=260703&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Fri Feb 12 13:02:39 2016
@@ -25,7 +25,7 @@ if(NOT LLVM_USE_INTEL_JITEVENTS )
set(LLVM_TOOL_LLVM_JITLISTENER_BUILD Off)
endif()
-if(CYGWIN)
+if(CYGWIN OR NOT LLVM_ENABLE_PIC)
set(LLVM_TOOL_LTO_BUILD Off)
set(LLVM_TOOL_LLVM_LTO_BUILD Off)
endif()
More information about the llvm-commits
mailing list