[llvm-commits] [llvm] r127553 - /llvm/trunk/tools/lto/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Sat Mar 12 14:01:36 PST 2011
Author: ofv
Date: Sat Mar 12 16:01:36 2011
New Revision: 127553
URL: http://llvm.org/viewvc/llvm-project?rev=127553&view=rev
Log:
Build LTO as a static library too.
Modified:
llvm/trunk/tools/lto/CMakeLists.txt
Modified: llvm/trunk/tools/lto/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/CMakeLists.txt?rev=127553&r1=127552&r2=127553&view=diff
==============================================================================
--- llvm/trunk/tools/lto/CMakeLists.txt (original)
+++ llvm/trunk/tools/lto/CMakeLists.txt Sat Mar 12 16:01:36 2011
@@ -10,10 +10,18 @@
LTOModule.cpp
)
-add_llvm_library(LTO ${SOURCES})
-
if( NOT WIN32 AND LLVM_ENABLE_PIC )
+ set(bsl ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS ON)
- add_llvm_library(LTO_dll ${SOURCES})
- set_property(TARGET LTO_dll PROPERTY OUTPUT_NAME "LTO")
+ add_llvm_library(LTO ${SOURCES})
+ set_property(TARGET LTO PROPERTY OUTPUT_NAME "LTO")
+ set(BUILD_SHARED_LIBS ${bsl})
+ set(LTO_STATIC_TARGET_NAME LTO_static)
+else()
+ set(LTO_STATIC_TARGET_NAME LTO)
+endif()
+
+if( NOT BUILD_SHARED_LIBS )
+ add_llvm_library(${LTO_STATIC_TARGET_NAME} ${SOURCES})
+ set_property(TARGET ${LTO_STATIC_TARGET_NAME} PROPERTY OUTPUT_NAME "LTO")
endif()
More information about the llvm-commits
mailing list