[libcxx] r291433 - [libcxx] Fix externally-threaded shared library builds after r291275.

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 02:38:57 PST 2017


Author: asiri
Date: Mon Jan  9 04:38:56 2017
New Revision: 291433

URL: http://llvm.org/viewvc/llvm-project?rev=291433&view=rev
Log:
[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.

Modified:
    libcxx/trunk/CMakeLists.txt

Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=291433&r1=291432&r2=291433&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Mon Jan  9 04:38:56 2017
@@ -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")




More information about the cfe-commits mailing list