From 4f229233ffc588a35e3738d3c358f2cf7a5da1d1 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 12 Feb 2016 19:03:12 +0000 Subject: [PATCH 1/1] Merging r260703: ------------------------------------------------------------------------ r260703 | hans | 2016-02-12 11:02:39 -0800 (Fri, 12 Feb 2016) | 11 lines [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 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@260704 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 9b89d87fc57..f50382b0897 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -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() -- 2.34.1