Skip to content

Commit fde6a37

Browse files
authored
gn build: Use -fvisibility-global-new-delete=force-hidden to build libcxx/libcxxabi/libunwind.
-fvisibility-global-new-delete-hidden is deprecated and clang was warning about it on every build command. These libraries are always built using a stage2 compiler, so we can use the new build flag unconditionally. Reviewers: aeubanks Reviewed By: aeubanks Pull Request: #88459
1 parent 7652a59 commit fde6a37

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/utils/gn/secondary/libcxx/src/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ if (libcxx_enable_static) {
291291
if (libcxx_hermetic_static_library) {
292292
cflags = [ "-fvisibility=hidden" ]
293293
if (libcxx_enable_new_delete_definitions) {
294-
cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
294+
cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
295295
}
296296
defines = [ "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" ]
297297
}

llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if (libcxxabi_enable_static) {
116116
if (libcxxabi_hermetic_static_library) {
117117
cflags = [ "-fvisibility=hidden" ]
118118
if (libcxxabi_enable_new_delete_definitions) {
119-
cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
119+
cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
120120
}
121121
defines = [
122122
"_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",

llvm/utils/gn/secondary/libunwind/src/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ if (libunwind_enable_static) {
119119
public = unwind_headers
120120
if (!invoker.export) {
121121
cflags = [ "-fvisibility=hidden" ]
122-
cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
122+
cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
123123
defines = [ "_LIBUNWIND_HIDE_SYMBOLS" ]
124124
}
125125
deps = [ "//compiler-rt/lib/builtins" ]

0 commit comments

Comments
 (0)