https://github.com/compnerd created https://github.com/llvm/llvm-project/pull/183609
The build incorrectly used `MSVC` to determine that we were building for Windows (MS ABI). This prevents the use of the GNU driver for building LLVM for Windows. Adjust the condition to `WIN32 AND NOT MINGW` to correctly identify that we are building for Windows MS ABI. >From 9d0d2fe2743ef4423dbeb9f8a0e4b46596bed3be Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool <[email protected]> Date: Thu, 26 Feb 2026 11:44:20 -0800 Subject: [PATCH] build: correct `MSVC` and Windows mixup for `CLANG_BUILD_STATIC` The build incorrectly used `MSVC` to determine that we were building for Windows (MS ABI). This prevents the use of the GNU driver for building LLVM for Windows. Adjust the condition to `WIN32 AND NOT MINGW` to correctly identify that we are building for Windows MS ABI. --- clang/cmake/modules/AddClang.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index 4059fc3e986c7..c811b7f459126 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -108,7 +108,7 @@ macro(add_clang_library name) endif() llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs}) - if(MSVC AND NOT CLANG_LINK_CLANG_DYLIB) + if((WIN32 AND NOT MINGW) AND NOT CLANG_LINK_CLANG_DYLIB) # Make sure all consumers also turn off visibility macros so they're not # trying to dllimport symbols. target_compile_definitions(${name} PUBLIC CLANG_BUILD_STATIC) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
