[clang] b246d5f - Disable symbol versions for clang-cpp also with MSVC
Aaron Puchert via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 18:44:28 PST 2024
Author: Aaron Puchert
Date: 2024-11-20T03:43:55+01:00
New Revision: b246d5f0556114d9a454bf2471f9c0577f1dce2f
URL: https://github.com/llvm/llvm-project/commit/b246d5f0556114d9a454bf2471f9c0577f1dce2f
DIFF: https://github.com/llvm/llvm-project/commit/b246d5f0556114d9a454bf2471f9c0577f1dce2f.diff
LOG: Disable symbol versions for clang-cpp also with MSVC
It seems we can get there with MSVC if LLVM_BUILD_LLVM_DYLIB_VIS is set.
Slightly surprising because I didn't know that MSVC supports the flag
-Bsymbolic-functions, but let's play it safe.
Added:
Modified:
clang/tools/clang-shlib/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 2b07d0083c4359..d83c13fd394f43 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -51,7 +51,7 @@ add_clang_library(clang-cpp
configure_file(simple_version_script.map.in simple_version_script.map)
-if (NOT APPLE AND NOT MINGW AND NOT LLVM_LINKER_IS_SOLARISLD)
+if (NOT APPLE AND NOT MSVC AND NOT MINGW AND NOT LLVM_LINKER_IS_SOLARISLD)
# Solaris ld does not accept global: *; so there is no way to version *all* global symbols
target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
endif()
More information about the cfe-commits
mailing list