diff options
author | Eric Fiselier <eric@efcs.ca> | 2015-10-15 22:41:51 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2015-10-15 22:41:51 +0000 |
commit | 1ab69fc5321336938e7cb0d960a13ab26395d8d5 (patch) | |
tree | 2fc3aefa6ae7bc3bfb69e795e6d775bb2c4b4fa9 /libcxx/cmake | |
parent | 0f629153af295e70d4c8c36fcbb8f9f2fe707bff (diff) | |
download | bcm5719-llvm-1ab69fc5321336938e7cb0d960a13ab26395d8d5.tar.gz bcm5719-llvm-1ab69fc5321336938e7cb0d960a13ab26395d8d5.zip |
[libcxx] Make libc++.so a linker script by default on most platforms.
Summary:
This patch turns on `LIBCXX_ENABLE_ABI_LINKER_SCRIPT` by default whenever `LLVM_HAVE_LINK_VERSION_SCRIPT` is ON. This turns out to be whenever:
1. WIN32 is not defined.
2 UNIX is defined.
3. APPLE is not defined.
While `LLVM_HAVE_LINK_VERSION_SCRIPT` is meant to reflect exactly what we are asking I think it's close enough.
After committing this patch Linux users will no longer have to use "-lc++abi" explicitly!
Reviewers: mclow.lists, danalbert, compnerd, jroelofs
Subscribers: emaste, rengolin, cbergstrom, cfe-commits
Differential Revision: http://reviews.llvm.org/D13739
llvm-svn: 250469
Diffstat (limited to 'libcxx/cmake')
-rw-r--r-- | libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake index 0e12c884ebf..6215be7f586 100644 --- a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -109,6 +109,30 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) message(STATUS "Sphinx disabled.") endif() + # FIXME - This is cribbed from HandleLLVMOptions.cmake. + if(WIN32) + set(LLVM_HAVE_LINK_VERSION_SCRIPT 0) + if(CYGWIN) + set(LLVM_ON_WIN32 0) + set(LLVM_ON_UNIX 1) + else(CYGWIN) + set(LLVM_ON_WIN32 1) + set(LLVM_ON_UNIX 0) + endif(CYGWIN) + else(WIN32) + if(UNIX) + set(LLVM_ON_WIN32 0) + set(LLVM_ON_UNIX 1) + if(APPLE) + set(LLVM_HAVE_LINK_VERSION_SCRIPT 0) + else(APPLE) + set(LLVM_HAVE_LINK_VERSION_SCRIPT 1) + endif(APPLE) + else(UNIX) + MESSAGE(SEND_ERROR "Unable to determine platform") + endif(UNIX) + endif(WIN32) + # Add LLVM Functions -------------------------------------------------------- include(AddLLVM OPTIONAL) endif() |