[gn build] (manually) port ce1365f8f7

This commit is contained in:
Nico Weber 2020-10-07 10:33:40 -04:00
parent 4cae6228d1
commit fbce456fad
2 changed files with 9 additions and 2 deletions

View File

@ -56,7 +56,9 @@ set(LIBCXX_SOURCES
) )
if (LIBCXX_ENABLE_DEBUG_MODE) if (LIBCXX_ENABLE_DEBUG_MODE)
list(APPEND LIBCXX_SOURCES debug.cpp) list(APPEND LIBCXX_SOURCES
debug.cpp
)
endif() endif()
if(WIN32) if(WIN32)

View File

@ -2,6 +2,9 @@ import("//clang/runtimes.gni")
import("//llvm/utils/gn/build/symlink_or_copy.gni") import("//llvm/utils/gn/build/symlink_or_copy.gni")
declare_args() { 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. # Build libc++ with definitions for operator new/delete.
libcxx_enable_new_delete_definitions = true libcxx_enable_new_delete_definitions = true
@ -115,7 +118,6 @@ cxx_sources = [
"chrono.cpp", "chrono.cpp",
"condition_variable.cpp", "condition_variable.cpp",
"condition_variable_destructor.cpp", "condition_variable_destructor.cpp",
"debug.cpp",
"exception.cpp", "exception.cpp",
"functional.cpp", "functional.cpp",
"future.cpp", "future.cpp",
@ -169,6 +171,9 @@ if (target_os == "win") {
if (target_os == "solaris") { if (target_os == "solaris") {
cxx_sources += [ "support/solaris/xlocale.cpp" ] cxx_sources += [ "support/solaris/xlocale.cpp" ]
} }
if (libcxx_enable_debug_mode) {
cxx_sources += [ "debug.cpp" ]
}
if (libcxx_enable_filesystem) { if (libcxx_enable_filesystem) {
cxx_sources += [ cxx_sources += [
"filesystem/directory_iterator.cpp", "filesystem/directory_iterator.cpp",