[PATCH] D13025: Modify cmake to test whether link version scripts are supported.
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 09:27:31 PDT 2015
vkalintiris created this revision.
vkalintiris added a reviewer: chandlerc.
vkalintiris added a subscriber: llvm-commits.
http://reviews.llvm.org/D13025
Files:
cmake/modules/HandleLLVMOptions.cmake
Index: cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -111,7 +111,12 @@
if(APPLE)
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
else(APPLE)
- set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+ set(SIMPLE_VERSION_SCRIPT ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/simple.script)
+ file(WRITE ${SIMPLE_VERSION_SCRIPT} "{ global: main; local: *; };")
+ set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+ set(CMAKE_REQUIRED_FLAGS "-Wl,--version-script,${SIMPLE_VERSION_SCRIPT}")
+ check_cxx_compiler_flag("" LLVM_HAVE_LINK_VERSION_SCRIPT)
+ set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endif(APPLE)
else(UNIX)
MESSAGE(SEND_ERROR "Unable to determine platform")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13025.35266.patch
Type: text/x-patch
Size: 861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150921/5a91f66c/attachment.bin>
More information about the llvm-commits
mailing list