Skip to content

Commit 3b1d018

Browse files
mati865mstorsjo
authored andcommitted
[MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled
Otherwise it's easy to hit 2^16 DLL exports limit. Differential Revision: https://reviews.llvm.org/D89225
1 parent d77d727 commit 3b1d018

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/tools/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ add_clang_subdirectory(c-index-test)
1515

1616
add_clang_subdirectory(clang-rename)
1717
add_clang_subdirectory(clang-refactor)
18-
if(UNIX OR MINGW)
18+
# For MinGW we only enable shared library if LLVM_LINK_LLVM_DYLIB=ON.
19+
# Without that option resulting library is too close to 2^16 DLL exports limit.
20+
if(UNIX OR (MINGW AND LLVM_LINK_LLVM_DYLIB))
1921
add_clang_subdirectory(clang-shlib)
2022
endif()
2123

0 commit comments

Comments
 (0)