build: correct MSVC and Windows mixup for CLANG_BUILD_STATIC#183609
build: correct MSVC and Windows mixup for CLANG_BUILD_STATIC#183609
MSVC and Windows mixup for CLANG_BUILD_STATIC#183609Conversation
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.
|
@llvm/pr-subscribers-clang Author: Saleem Abdulrasool (compnerd) ChangesThe build incorrectly used Full diff: https://github.com/llvm/llvm-project/pull/183609.diff 1 Files Affected:
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)
|
…m#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. (cherry picked from commit 20ec9a9)
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/44859 Here is the relevant piece of the build log for the reference |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/20206 Here is the relevant piece of the build log for the reference |
…m#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.
The build incorrectly used
MSVCto 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 toWIN32 AND NOT MINGWto correctly identify that we are building for Windows MS ABI.