diff options
| author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-14 23:58:11 +0000 |
|---|---|---|
| committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-14 23:58:11 +0000 |
| commit | 28383a4e03033cbce5b175558627891558ca1f23 (patch) | |
| tree | 4b8d22ee115dce0f9c06c9f4151734b2d5afea15 | |
| parent | 0fb24887026f9314a49f1ebd6ff6ed5352279913 (diff) | |
| download | bcm5719-llvm-28383a4e03033cbce5b175558627891558ca1f23.tar.gz bcm5719-llvm-28383a4e03033cbce5b175558627891558ca1f23.zip | |
Disable LIBCXX_ENABLE_ABI_LINKER_SCRIPT for static library builds.
This option is geared towards shared library builds and causes static
library builds to fail if not explicitly disabled.
This patch fixes PR27706: https://llvm.org/bugs/show_bug.cgi?id=27706
Thanks rgoodfel@isi.edu for the catch.
llvm-svn: 269585
| -rw-r--r-- | libcxx/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index abb1ffd264d..8460561aa5b 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -96,7 +96,8 @@ option(LIBCXX_ENABLE_STATIC_ABI_LIBRARY "Statically link the ABI library" OFF) set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE OFF) if (LLVM_HAVE_LINK_VERSION_SCRIPT AND NOT LIBCXX_ENABLE_STATIC_ABI_LIBRARY AND NOT LIBCXX_CXX_ABI_LIBNAME STREQUAL "none" - AND PYTHONINTERP_FOUND) + AND PYTHONINTERP_FOUND + AND LIBCXX_ENABLE_SHARED) set(ENABLE_LINKER_SCRIPT_DEFAULT_VALUE ON) endif() @@ -203,6 +204,9 @@ if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT) if (NOT PYTHONINTERP_FOUND) message(FATAL_ERROR "LIBCXX_ENABLE_ABI_LINKER_SCRIPT requires python but it was not found.") endif() + if (NOT LIBCXX_ENABLE_SHARED) + message(FATAL_ERROR "LIBCXX_ENABLE_ABI_LINKER_SCRIPT is only available for shared library builds.") + endif() endif() if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT) |

