[llvm] fd5e79f - [MinGW] Fix the cmake condition for -mbig-obj

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 13:48:33 PDT 2021


Author: Mateusz Mikuła
Date: 2021-05-18T23:48:15+03:00
New Revision: fd5e79ff12204b5850cca364fc669fa10eb9a1a5

URL: https://github.com/llvm/llvm-project/commit/fd5e79ff12204b5850cca364fc669fa10eb9a1a5
DIFF: https://github.com/llvm/llvm-project/commit/fd5e79ff12204b5850cca364fc669fa10eb9a1a5.diff

LOG: [MinGW] Fix the cmake condition for -mbig-obj

This is a correction to D102419, fixing the condition to the
form that actually works as intended.

Added: 
    

Modified: 
    llvm/cmake/modules/HandleLLVMOptions.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index f2820f65d27b..e7a1e9ea38e7 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -412,7 +412,7 @@ elseif(MINGW) # FIXME: Also cygwin?
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,16777216")
 
   # Pass -mbig-obj to mingw gas to avoid COFF 2**16 section limit.
-  if (NOT CLANG)
+  if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
     append("-Wa,-mbig-obj" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endif()
 endif()


        


More information about the llvm-commits mailing list