[clang] [Clang][Cygwin] don't use -Bsymbolic-functions (PR #138217)

via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 16:47:23 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: None (jeremyd2019)

<details>
<summary>Changes</summary>

GNU ld seems to ignore this option, but LLD treats the presence of this unknown option as an error.

---
Full diff: https://github.com/llvm/llvm-project/pull/138217.diff


1 Files Affected:

- (modified) clang/tools/clang-shlib/CMakeLists.txt (+1-1) 


``````````diff
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 31484ec49c773..317964de4fb17 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -57,7 +57,7 @@ endif()
 
 # Optimize function calls for default visibility definitions to avoid PLT and
 # reduce dynamic relocations.
-if (NOT APPLE AND NOT MINGW AND NOT LLVM_LINKER_IS_SOLARISLD_ILLUMOS)
+if (NOT APPLE AND NOT MINGW AND NOT CYGWIN AND NOT LLVM_LINKER_IS_SOLARISLD_ILLUMOS)
   target_link_options(clang-cpp PRIVATE LINKER:-Bsymbolic-functions)
 endif()
 if (MINGW OR CYGWIN)

``````````

</details>


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


More information about the cfe-commits mailing list