diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2017-01-09 10:38:56 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2017-01-09 10:38:56 +0000 |
commit | da39f1bc799bad3a6701b9c4eda52120939e3d8c (patch) | |
tree | 16710396fc4ba937aa26f178adfd4148232f02ba | |
parent | c60e8fcdcd6b463a66929120b0d37ff2d1412811 (diff) | |
download | libcxx-da39f1bc799bad3a6701b9c4eda52120939e3d8c.tar.gz |
[libcxx] Fix externally-threaded shared library builds after r291275.
Need to allow unresolved symbols in the dylib. This was previously done for
LIBCXX_HAS_EXTERNAL_THREAD_API, but we have since split that into two with
LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY being the externally-threaded variant.
Also a minor CMakeLists.txt cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291433 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6dbe8f95a..9fa0ed37e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -245,16 +245,17 @@ if(NOT LIBCXX_ENABLE_THREADS) endif() -if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_HAS_EXTERNAL_THREAD_API) - message(FATAL_ERROR "The options LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY and " - "LIBCXX_HAS_EXTERNAL_THREAD_API cannot both be ON at " - "the same time") -endif() - -if(LIBCXX_HAS_PTHREAD_API AND LIBCXX_HAS_EXTERNAL_THREAD_API) - message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" - "and LIBCXX_HAS_PTHREAD_API cannot be both" - "set to ON at the same time.") +if (LIBCXX_HAS_EXTERNAL_THREAD_API) + if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + message(FATAL_ERROR "The options LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY and " + "LIBCXX_HAS_EXTERNAL_THREAD_API cannot both be ON at " + "the same time") + endif() + if (LIBCXX_HAS_PTHREAD_API) + message(FATAL_ERROR "The options LIBCXX_HAS_EXTERNAL_THREAD_API" + "and LIBCXX_HAS_PTHREAD_API cannot be both" + "set to ON at the same time.") + endif() endif() # Ensure LLVM_USE_SANITIZER is not specified when LIBCXX_GENERATE_COVERAGE @@ -460,7 +461,7 @@ if (NOT LIBCXX_ENABLE_RTTI) endif() # Threading flags ============================================================= -if (LIBCXX_HAS_EXTERNAL_THREAD_API AND LIBCXX_ENABLE_SHARED) +if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY AND LIBCXX_ENABLE_SHARED) # Need to allow unresolved symbols if this is to work with shared library builds if (APPLE) add_link_flags("-undefined dynamic_lookup") |