File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ pub fn buildLibCXX(comp: *Compilation) !void {
129
129
try cflags .append ("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS" );
130
130
try cflags .append ("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" );
131
131
try cflags .append ("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS" );
132
+ try cflags .append ("-fvisibility=hidden" );
133
+ try cflags .append ("-fvisibility-inlines-hidden" );
132
134
133
135
if (target .abi .isMusl ()) {
134
136
try cflags .append ("-D_LIBCPP_HAS_MUSL_LIBC" );
@@ -144,7 +146,6 @@ pub fn buildLibCXX(comp: *Compilation) !void {
144
146
try cflags .append ("-fPIC" );
145
147
}
146
148
try cflags .append ("-nostdinc++" );
147
- try cflags .append ("-fvisibility-inlines-hidden" );
148
149
try cflags .append ("-std=c++14" );
149
150
try cflags .append ("-Wno-user-defined-literals" );
150
151
@@ -249,6 +250,8 @@ pub fn buildLibCXXABI(comp: *Compilation) !void {
249
250
try cflags .append ("-D_LIBCXXABI_BUILDING_LIBRARY" );
250
251
try cflags .append ("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS" );
251
252
try cflags .append ("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS" );
253
+ try cflags .append ("-fvisibility=hidden" );
254
+ try cflags .append ("-fvisibility-inlines-hidden" );
252
255
253
256
if (target .abi .isMusl ()) {
254
257
try cflags .append ("-D_LIBCPP_HAS_MUSL_LIBC" );
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ pub fn buildStaticLib(comp: *Compilation) !void {
69
69
}
70
70
try cflags .append ("-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS" );
71
71
try cflags .append ("-Wa,--noexecstack" );
72
+ try cflags .append ("-fvisibility=hidden" );
73
+ try cflags .append ("-fvisibility-inlines-hidden" );
72
74
73
75
// This is intentionally always defined because the macro definition means, should it only
74
76
// build for the target specified by compiler defines. Since we pass -target the compiler
You can’t perform that action at this time.
0 commit comments