diff options
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/gn/secondary/libcxx/src/BUILD.gn | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn index 4b819ffe4c0..9909bb1e373 100644 --- a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn +++ b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn @@ -84,6 +84,9 @@ config("cxx_config") { "_CRT_STDIO_ISO_WIDE_SPECIFIERS", ] } + if (!libcxx_enable_new_delete_definitions) { + defines += [ "_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS" ] + } if (libcxx_enable_exceptions) { if (current_os == "win") { cflags_cc += [ "/EHsc" ] @@ -97,7 +100,7 @@ config("cxx_config") { } else { cflags_cc += [ "-fno-exceptions" ] } - defines += [ "-D_LIBCPP_NO_EXCEPTIONS" ] + defines += [ "_LIBCPP_NO_EXCEPTIONS" ] } if (!libcxx_enable_rtti) { if (current_os == "win") { @@ -105,7 +108,7 @@ config("cxx_config") { } else { cflags_cc += [ "-fno-rtti" ] } - defines += [ "-D_LIBCPP_NO_RTTI" ] + defines += [ "_LIBCPP_NO_RTTI" ] } } @@ -251,7 +254,9 @@ if (libcxx_enable_static) { sources = cxx_sources if (libcxx_hermetic_static_library) { cflags = [ "-fvisibility=hidden" ] - cflags_cc = [ "-fvisibility-global-new-delete-hidden" ] + if (libcxx_enable_new_delete_definitions) { + cflags_cc = [ "-fvisibility-global-new-delete-hidden" ] + } defines = [ "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" ] } deps = [ |

