[llvm] gn build: Use -fvisibility-global-new-delete=force-hidden to build libcxx/libcxxabi/libunwind. (PR #88459)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 16:25:39 PDT 2024
https://github.com/pcc created https://github.com/llvm/llvm-project/pull/88459
-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.
>From a08a657b11031d4540840075b26ea26f8a144134 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne <pcc at google.com>
Date: Thu, 11 Apr 2024 16:25:26 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.6-beta.1
---
llvm/utils/gn/secondary/libcxx/src/BUILD.gn | 2 +-
llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn | 2 +-
llvm/utils/gn/secondary/libunwind/src/BUILD.gn | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
index 5da8db4574a0cc..718ee2b881b1b7 100644
--- a/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/src/BUILD.gn
@@ -290,7 +290,7 @@ if (libcxx_enable_static) {
if (libcxx_hermetic_static_library) {
cflags = [ "-fvisibility=hidden" ]
if (libcxx_enable_new_delete_definitions) {
- cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
+ cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
}
defines = [ "_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" ]
}
diff --git a/llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn b/llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
index c82634e2bb0648..1f183c912c00d2 100644
--- a/llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxxabi/src/BUILD.gn
@@ -116,7 +116,7 @@ if (libcxxabi_enable_static) {
if (libcxxabi_hermetic_static_library) {
cflags = [ "-fvisibility=hidden" ]
if (libcxxabi_enable_new_delete_definitions) {
- cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
+ cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
}
defines = [
"_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
diff --git a/llvm/utils/gn/secondary/libunwind/src/BUILD.gn b/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
index ea95b1d64fdde8..2396300f94717e 100644
--- a/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
+++ b/llvm/utils/gn/secondary/libunwind/src/BUILD.gn
@@ -119,7 +119,7 @@ if (libunwind_enable_static) {
public = unwind_headers
if (!invoker.export) {
cflags = [ "-fvisibility=hidden" ]
- cflags_cc = [ "-fvisibility-global-new-delete-hidden" ]
+ cflags_cc = [ "-fvisibility-global-new-delete=force-hidden" ]
defines = [ "_LIBUNWIND_HIDE_SYMBOLS" ]
}
deps = [ "//compiler-rt/lib/builtins" ]
More information about the llvm-commits
mailing list