[libcxx-commits] [libcxx] 7a9b8a8 - [gn build] Port 2b2e7f6e5727

Nico Weber via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 13 05:37:34 PDT 2023


Author: Nico Weber
Date: 2023-07-13T08:37:12-04:00
New Revision: 7a9b8a83743b3795c5e0071550bcc280fb3f72fd

URL: https://github.com/llvm/llvm-project/commit/7a9b8a83743b3795c5e0071550bcc280fb3f72fd
DIFF: https://github.com/llvm/llvm-project/commit/7a9b8a83743b3795c5e0071550bcc280fb3f72fd.diff

LOG: [gn build] Port 2b2e7f6e5727

Added: 
    

Modified: 
    libcxx/src/CMakeLists.txt
    llvm/utils/gn/secondary/libcxx/include/BUILD.gn
    llvm/utils/gn/secondary/libcxx/src/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index a3f8f4dc3a3cd1..dc6b591335a6e9 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -319,7 +319,9 @@ set(LIBCXX_EXPERIMENTAL_SOURCES
   )
 
 if (LIBCXX_PSTL_CPU_BACKEND STREQUAL "libdispatch")
-  list(APPEND LIBCXX_EXPERIMENTAL_SOURCES pstl/libdispatch.cpp)
+  list(APPEND LIBCXX_EXPERIMENTAL_SOURCES
+    pstl/libdispatch.cpp
+    )
 endif()
 
 add_library(cxx_experimental STATIC ${LIBCXX_EXPERIMENTAL_SOURCES})

diff  --git a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
index 27545cada1c491..2a225d9841327c 100644
--- a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
@@ -36,6 +36,7 @@ if (current_toolchain == default_toolchain) {
       "_LIBCPP_HAS_NO_WIDE_CHARACTERS=",
       "_LIBCPP_ABI_DEFINES=",
       "_LIBCPP_ENABLE_ASSERTIONS_DEFAULT=",
+      "_LIBCPP_PSTL_CPU_BACKEND_LIBDISPATCH=",
       "_LIBCPP_PSTL_CPU_BACKEND_SERIAL=1",
       "_LIBCPP_PSTL_CPU_BACKEND_THREAD=",
     ]
@@ -147,6 +148,7 @@ if (current_toolchain == default_toolchain) {
       "__algorithm/pstl_backends/cpu_backends/fill.h",
       "__algorithm/pstl_backends/cpu_backends/find_if.h",
       "__algorithm/pstl_backends/cpu_backends/for_each.h",
+      "__algorithm/pstl_backends/cpu_backends/libdispatch.h",
       "__algorithm/pstl_backends/cpu_backends/merge.h",
       "__algorithm/pstl_backends/cpu_backends/serial.h",
       "__algorithm/pstl_backends/cpu_backends/stable_sort.h",

diff  --git a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
index 8a18922c4b4bc2..512dc2a02f2936 100644
--- a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
@@ -213,6 +213,11 @@ if (libcxx_enable_filesystem) {
   }
 }
 
+# FIXME: Put this behind an arg, or enable it by default on macOS.
+if (false) {
+  cxx_sources += [ "pstl/libdispatch.cpp" ]
+}
+
 if (libcxx_enable_shared) {
   shared_library("cxx_shared") {
     output_dir = runtimes_dir


        


More information about the libcxx-commits mailing list