[clang] 80cdc37 - [Clang] Include the clang-shlib CMake project when building for MSVC (#109457)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 22 22:24:08 PDT 2024
Author: Thomas Fransham
Date: 2024-09-23T07:24:04+02:00
New Revision: 80cdc3718036cd3ee33424953821ac01046d5278
URL: https://github.com/llvm/llvm-project/commit/80cdc3718036cd3ee33424953821ac01046d5278
DIFF: https://github.com/llvm/llvm-project/commit/80cdc3718036cd3ee33424953821ac01046d5278.diff
LOG: [Clang] Include the clang-shlib CMake project when building for MSVC (#109457)
Enable building clang-cpp shared library for windows when building with
explicit visibility macros enabled and LLVM is built as a shared
library(LLVM_BUILD_LLVM_DYLIB_VIS).
This is part of the effort to support for enabling plugins on windows by
adding better support for building LLVM and Clang as a DLL.
Added:
Modified:
clang/tools/CMakeLists.txt
Removed:
################################################################################
diff --git a/clang/tools/CMakeLists.txt b/clang/tools/CMakeLists.txt
index 9a3512712a28a4..88e29412e54350 100644
--- a/clang/tools/CMakeLists.txt
+++ b/clang/tools/CMakeLists.txt
@@ -22,7 +22,7 @@ add_clang_subdirectory(c-index-test)
add_clang_subdirectory(clang-refactor)
# For MinGW we only enable shared library if LLVM_LINK_LLVM_DYLIB=ON.
# Without that option resulting library is too close to 2^16 DLL exports limit.
-if(UNIX OR (MINGW AND LLVM_LINK_LLVM_DYLIB))
+if(UNIX OR (MSVC AND LLVM_BUILD_LLVM_DYLIB_VIS) OR (MINGW AND LLVM_LINK_LLVM_DYLIB))
add_clang_subdirectory(clang-shlib)
endif()
More information about the cfe-commits
mailing list