[clang] [llvm] [CMake] Add a linker test for -Bsymbolic-functions to AddLLVM (PR #79539)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 23:17:27 PDT 2025


================
@@ -355,6 +349,9 @@ function(add_link_opts target_name)
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                  LINK_FLAGS " -Wl,-brtl")
   endif()
+
+  check_linker_flag(CXX "-Wl,-Bsymbolic-functions"
----------------
MaskRay wrote:

While I am aware of https://ewontfix.com/13/ ("Incorrect configure checks for availability of functions"), there have been many cmake changes to skip some checks that are guaranteed to succeed, to make cmake run faster (llvm's cmake is really slow). I wonder whether there is a condition that can skip the check for systems that always have -Bsymbolic-functions.

https://github.com/llvm/llvm-project/pull/79539


More information about the cfe-commits mailing list