llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Saleem Abdulrasool (compnerd)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/183609.diff


1 Files Affected:

- (modified) clang/cmake/modules/AddClang.cmake (+1-1) 


``````````diff
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)

``````````

</details>


https://github.com/llvm/llvm-project/pull/183609
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to