aboutsummaryrefslogtreecommitdiff
path: root/libunwind
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2024-03-13 22:01:01 +0200
committerGitHub <noreply@github.com>2024-03-13 16:01:01 -0400
commit1f973efd335f34c75fcba1ccbe288fd5ece15a64 (patch)
tree477b7ad2edc8744a2067e8ae217044529f2a7e91 /libunwind
parent8237520eb42b37d7ed353d64a865d3ba5ac24ec6 (diff)
downloadllvm-1f973efd335f34c75fcba1ccbe288fd5ece15a64.zip
llvm-1f973efd335f34c75fcba1ccbe288fd5ece15a64.tar.gz
llvm-1f973efd335f34c75fcba1ccbe288fd5ece15a64.tar.bz2
[runtimes] Prefer -fvisibility-global-new-delete=force-hidden (#84917)
27ce26b06655cfece3d54b30e442ef93d3e78ac7 added the new option -fvisibility-global-new-delete=, where -fvisibility-global-new-delete=force-hidden is equivalent to the old option -fvisibility-global-new-delete-hidden. At the same time, the old option was deprecated. Test for and use the new option form first; if unsupported, try using the old form. This avoids warnings in the MinGW builds, if built with Clang 18 or newer.
Diffstat (limited to 'libunwind')
-rw-r--r--libunwind/src/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 9c6f5d9..780430b 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -201,7 +201,10 @@ set_target_properties(unwind_static_objects
if(LIBUNWIND_HIDE_SYMBOLS)
target_add_compile_flags_if_supported(unwind_static_objects PRIVATE -fvisibility=hidden)
- target_add_compile_flags_if_supported(unwind_static_objects PRIVATE -fvisibility-global-new-delete-hidden)
+ target_add_compile_flags_if_supported(unwind_static_objects PRIVATE -fvisibility-global-new-delete=force-hidden)
+ if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG)
+ target_add_compile_flags_if_supported(unwind_static_objects PRIVATE -fvisibility-global-new-delete-hidden)
+ endif()
target_compile_definitions(unwind_static_objects PRIVATE _LIBUNWIND_HIDE_SYMBOLS)
endif()