[llvm] r221345 - Add a LLVM_BUILD_STATIC option to cmake.
Rafael Espindola
rafael.espindola at gmail.com
Wed Nov 5 06:03:58 PST 2014
Author: rafael
Date: Wed Nov 5 08:03:58 2014
New Revision: 221345
URL: http://llvm.org/viewvc/llvm-project?rev=221345&view=rev
Log:
Add a LLVM_BUILD_STATIC option to cmake.
Setting it to true causes all executables to be statically linked.
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=221345&r1=221344&r2=221345&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Nov 5 08:03:58 2014
@@ -167,6 +167,10 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT
endif( LLVM_BUILD_32_BITS )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
+if (LLVM_BUILD_STATIC)
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
+endif()
+
if( XCODE )
# For Xcode enable several build settings that correspond to
# many warnings that are on by default in Clang but are
More information about the llvm-commits
mailing list