File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,10 @@ if (LIBCXX_ENABLE_STATIC)
306
306
# then its code shouldn't declare them with hidden visibility. They might
307
307
# actually be provided by a shared library at link time.
308
308
if (LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS )
309
- append_flags_if_supported (CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete-hidden )
309
+ append_flags_if_supported (CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete=force-hidden )
310
+ if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG )
311
+ append_flags_if_supported (CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete-hidden )
312
+ endif ()
310
313
endif ()
311
314
target_compile_options (cxx_static PRIVATE ${CXX_STATIC_LIBRARY_FLAGS} )
312
315
# _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
Original file line number Diff line number Diff line change @@ -265,7 +265,10 @@ if(LIBCXXABI_HERMETIC_STATIC_LIBRARY)
265
265
# then its code shouldn't declare them with hidden visibility. They might
266
266
# actually be provided by a shared library at link time.
267
267
if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS )
268
- target_add_compile_flags_if_supported (cxxabi_static_objects PRIVATE -fvisibility-global-new-delete-hidden )
268
+ target_add_compile_flags_if_supported (cxxabi_static_objects PRIVATE -fvisibility-global-new-delete=force-hidden )
269
+ if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG )
270
+ target_add_compile_flags_if_supported (cxxabi_static_objects PRIVATE -fvisibility-global-new-delete-hidden )
271
+ endif ()
269
272
endif ()
270
273
# _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in libcxx's
271
274
# __config_site too. Define it in the same way here, to avoid redefinition
Original file line number Diff line number Diff line change @@ -201,7 +201,10 @@ set_target_properties(unwind_static_objects
201
201
202
202
if (LIBUNWIND_HIDE_SYMBOLS )
203
203
target_add_compile_flags_if_supported (unwind_static_objects PRIVATE -fvisibility=hidden )
204
- target_add_compile_flags_if_supported (unwind_static_objects PRIVATE -fvisibility-global-new-delete-hidden )
204
+ target_add_compile_flags_if_supported (unwind_static_objects PRIVATE -fvisibility-global-new-delete=force-hidden )
205
+ if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG )
206
+ target_add_compile_flags_if_supported (unwind_static_objects PRIVATE -fvisibility-global-new-delete-hidden )
207
+ endif ()
205
208
target_compile_definitions (unwind_static_objects PRIVATE _LIBUNWIND_HIDE_SYMBOLS )
206
209
endif ()
207
210
You can’t perform that action at this time.
0 commit comments