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
This commit is contained in:
Jameson Nash 2020-12-03 10:37:18 -05:00
parent f86ec1e1fc
commit c01fb6449e
1 changed files with 7 additions and 1 deletions

View File

@ -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")