[llvm] c01fb64 - repair cygwin build
    Jameson Nash via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Dec  3 08:49:50 PST 2020
    
    
  
Author: Jameson Nash
Date: 2020-12-03T11:49:16-05:00
New Revision: c01fb6449e1794488f6ec6f1c7792c35325022af
URL: https://github.com/llvm/llvm-project/commit/c01fb6449e1794488f6ec6f1c7792c35325022af
DIFF: https://github.com/llvm/llvm-project/commit/c01fb6449e1794488f6ec6f1c7792c35325022af.diff
LOG: repair cygwin build
This is needed for cross-compiling LLVM from Cygwin, but it had gotten
deleted in rG2724d9e12960cc1d93eeabbfc9aa1bffffa041cc
Reviewed By: compnerd
Differential Revision: https://reviews.llvm.org/D92336
Added: 
    
Modified: 
    llvm/CMakeLists.txt
Removed: 
    
################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index c085f889cc4a..9b5cadeed0c4 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -52,7 +52,13 @@ project(LLVM
 
 set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
 set(CMAKE_CXX_STANDARD_REQUIRED YES)
-set(CMAKE_CXX_EXTENSIONS NO)
+if (CYGWIN)
+  # Cygwin is a bit stricter and lack things like 'strdup', 'stricmp', etc in
+  # c++xx mode.
+  set(CMAKE_CXX_EXTENSIONS YES)
+else()
+  set(CMAKE_CXX_EXTENSIONS NO)
+endif()
 
 if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
   message(STATUS "No build type selected, default to Debug")
        
    
    
More information about the llvm-commits
mailing list