[llvm] fbce456 - [gn build] (manually) port ce1365f8f7e

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 07:34:03 PDT 2020


Author: Nico Weber
Date: 2020-10-07T10:33:51-04:00
New Revision: fbce456fad35efa857b9dea2cff3a938835de44d

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

LOG: [gn build] (manually) port ce1365f8f7e

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 97e6e226b1ac..5de4a513ac17 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -56,7 +56,9 @@ set(LIBCXX_SOURCES
   )
 
 if (LIBCXX_ENABLE_DEBUG_MODE)
-  list(APPEND LIBCXX_SOURCES debug.cpp)
+  list(APPEND LIBCXX_SOURCES
+    debug.cpp
+    )
 endif()
 
 if(WIN32)

diff  --git a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
index 6dccffa7aa34..71668b65f72f 100644
--- a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
@@ -2,6 +2,9 @@ import("//clang/runtimes.gni")
 import("//llvm/utils/gn/build/symlink_or_copy.gni")
 
 declare_args() {
+  # Whether to support libc++ opt-in debug mode via _LIBCPP_DEBUG.
+  libcxx_enable_debug_mode = true
+
   # Build libc++ with definitions for operator new/delete.
   libcxx_enable_new_delete_definitions = true
 
@@ -115,7 +118,6 @@ cxx_sources = [
   "chrono.cpp",
   "condition_variable.cpp",
   "condition_variable_destructor.cpp",
-  "debug.cpp",
   "exception.cpp",
   "functional.cpp",
   "future.cpp",
@@ -169,6 +171,9 @@ if (target_os == "win") {
 if (target_os == "solaris") {
   cxx_sources += [ "support/solaris/xlocale.cpp" ]
 }
+if (libcxx_enable_debug_mode) {
+  cxx_sources += [ "debug.cpp" ]
+}
 if (libcxx_enable_filesystem) {
   cxx_sources += [
     "filesystem/directory_iterator.cpp",


        


More information about the llvm-commits mailing list