[libcxx-commits] [PATCH] D86773: [libcxx] Link target `cxx_external_threads` to `cxx-headers` for BUILD_EXTERNAL_THREAD_LIBRARY
David Nicuesa via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Aug 28 03:44:27 PDT 2020
Nicu created this revision.
Nicu added reviewers: libc++, ldionne, miyuki.
Nicu added a project: libc++.
Herald added subscribers: libcxx-commits, dexonsmith, mgorny.
Herald added 1 blocking reviewer(s): libc++.
Nicu requested review of this revision.
Fix compilation of libcxx when using -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY. Target `cxx_external_threads` gets linked to `cxx-headers` to include all needed headers and flags.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D86773
Files:
libcxx/src/CMakeLists.txt
Index: libcxx/src/CMakeLists.txt
===================================================================
--- libcxx/src/CMakeLists.txt
+++ libcxx/src/CMakeLists.txt
@@ -323,7 +323,8 @@
if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)
- file(GLOB LIBCXX_EXTERNAL_THREADING_SUPPORT_SOURCES ../test/support/external_threads.cpp)
+ set(LIBCXX_EXTERNAL_THREADING_SUPPORT_SOURCES
+ "${CMAKE_CURRENT_SOURCE_DIR}/../test/support/external_threads.cpp")
if (LIBCXX_ENABLE_SHARED)
add_library(cxx_external_threads SHARED ${LIBCXX_EXTERNAL_THREADING_SUPPORT_SOURCES})
@@ -337,6 +338,8 @@
COMPILE_FLAGS "${LIBCXX_COMPILE_FLAGS}"
OUTPUT_NAME "c++external_threads"
)
+
+ target_link_libraries(cxx_external_threads PRIVATE cxx-headers)
endif()
if (LIBCXX_INSTALL_LIBRARY)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86773.288569.patch
Type: text/x-patch
Size: 791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200828/8c648e52/attachment.bin>
More information about the libcxx-commits
mailing list