Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ed80035

Browse files
Mike KleinSkia Commit-Bot
authored andcommitted
try always setting fvisibility=hidden
It simplifies things to always build this way, to mimic how we're built by clients, and to better approximate MSVC defaults. I'm not sure I believe my old note about making stack traces worse on Linux. Change-Id: I0554a58573074fc6ae030fa09e11976a718645b5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307834 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
1 parent 6fbd92d commit ed80035

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

gn/BUILD.gn

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,12 @@ config("default") {
133133
cflags += [
134134
"-fstrict-aliasing",
135135
"-fPIC",
136+
"-fvisibility=hidden",
137+
]
138+
cflags_cc += [
139+
"-std=c++17",
140+
"-fvisibility-inlines-hidden",
136141
]
137-
cflags_cc += [ "-std=c++17" ]
138-
139-
# The main idea is to slim the exported API, but these flags also improve link time on Mac.
140-
# These would make stack traces worse on Linux, so we don't just set them willy-nilly.
141-
if (is_component_build || is_ios || is_mac) {
142-
cflags += [ "-fvisibility=hidden" ]
143-
cflags_cc += [ "-fvisibility-inlines-hidden" ]
144-
}
145142
}
146143

147144
if (current_cpu == "arm") {

0 commit comments

Comments
 (0)