[PATCH] D89225: [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled

Mateusz MikuĊ‚a via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 12 02:57:37 PDT 2020


mati865 created this revision.
mati865 added a reviewer: mstorsjo.
mati865 added a project: clang.
Herald added subscribers: cfe-commits, mgorny.
mati865 requested review of this revision.

Otherwise it's easy to hit 2^16 DLL exports limit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89225

Files:
  clang/tools/CMakeLists.txt


Index: clang/tools/CMakeLists.txt
===================================================================
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -15,7 +15,9 @@
 
 add_clang_subdirectory(clang-rename)
 add_clang_subdirectory(clang-refactor)
-if(UNIX OR MINGW)
+# 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))
   add_clang_subdirectory(clang-shlib)
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89225.297526.patch
Type: text/x-patch
Size: 529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201012/dea24b95/attachment.bin>


More information about the cfe-commits mailing list