summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-11-17 11:22:23 +0000
committerPavel Labath <labath@google.com>2016-11-17 11:22:23 +0000
commit10849a81f3355988b0964b7e759bc4d6d96953e4 (patch)
tree9eb00a0bb17691b34726c0307b07b57353d76ea5 /llvm/cmake/modules
parentc41e856f5343585621229cc93ed734ee470e2515 (diff)
downloadbcm5719-llvm-10849a81f3355988b0964b7e759bc4d6d96953e4.tar.gz
bcm5719-llvm-10849a81f3355988b0964b7e759bc4d6d96953e4.zip
[cmake] Move LLVM_BUILD_STATIC check to an earlier point
Summary: The motivation for this is to enable correct detection of dlopen() on Android. Android does not provide a static version of libdl, so if we add the -static flag after performing the check, it will succeed even though subsequent link steps will fail. With this change we correctly detect the absence of libdl in a LLVM_BUILD_STATIC build on Android. The link itself still does not succeed because the code does not check the result of this check properly, but I plan to fix that in a separate change. Reviewers: beanz Subscribers: danalbert, mgorny, srhines, tberghammer, llvm-commits Differential Revision: https://reviews.llvm.org/D26463 llvm-svn: 287220
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 3abe57a5e3f..b85b9b9cb30 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -180,10 +180,6 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
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
OpenPOWER on IntegriCloud