[clang] [Clang][Cygwin] Disable shared libs on Cygwin by default (PR #138119)

via cfe-commits cfe-commits at lists.llvm.org
Fri May 2 13:23:13 PDT 2025


================
@@ -106,7 +106,8 @@ if (LLVM_EXPORTED_SYMBOL_FILE)
                      DEPENDS ${LIBCLANG_VERSION_SCRIPT_FILE})
 endif()
 
-if(LLVM_ENABLE_PIC OR (WIN32 AND NOT LIBCLANG_BUILD_STATIC))
+if((NOT (WIN32 OR CYGWIN) AND LLVM_ENABLE_PIC) OR
+  ((WIN32 OR CYGWIN) AND NOT LIBCLANG_BUILD_STATIC))
----------------
jeremyd2019 wrote:

I'm confused now, the condition before had `WIN32 AND NOT LIBCLANG_BUILD_STATIC` but that branch was never hit because `LLVM_ENABLE_PIC` was defaulted `ON` on Windows.  What exactly is `LIBCLANG_BUILD_STATIC` supposed to do, if not switch from building a shared libclang to building a static one?

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


More information about the cfe-commits mailing list