[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 22:14:45 PDT 2025
================
@@ -314,6 +308,11 @@ function(add_link_opts target_name)
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-brtl")
endif()
+
+ if (NOT MINGW)
+ llvm_check_linker_flag(CXX "-Wl,-Bsymbolic-functions"
+ LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS)
+ endif()
----------------
jeremyd2019 wrote:
BFD accepts `-Bsymbolic-functions` but it's a no-op for anything other than ELF. LLD rejects the option as unknown in the MinGW driver. So it would be fine to remove the `if (NOT MINGW)` wrapping that, and let it use the flag or not depending on whether the linker accepts it.
https://github.com/llvm/llvm-project/pull/79539
More information about the cfe-commits
mailing list