llvm.org GIT mirror llvm / 3f06e3f
Use -std=gnu++11 on cygwin and mingw. Without this common features like off_t and strdup are missing. This should bring back those bots. Configure bits by Meador Inge. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203701 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
2 changed file(s) with 14 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
321321 ifeq ($(ENABLE_CXX1Y),1)
322322 CXX.Flags += -std=c++1y
323323 else
324 CXX.Flags += -std=c++11
324 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
325 # MinGW and Cygwin are a bit stricter and lack things like
326 # 'strdup', 'stricmp', etc in c++11 mode.
327 CXX.Flags += -std=gnu++11
328 else
329 CXX.Flags += -std=c++11
330 endif
325331 endif
326332
327333 ifeq ($(ENABLE_WERROR),1)
292292 else()
293293 check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11)
294294 if (CXX_SUPPORTS_CXX11)
295 append("-std=c++11" CMAKE_CXX_FLAGS)
295 if (CYGWIN OR MINGW)
296 # MinGW and Cygwin are a bit stricter and lack things like
297 # 'strdup', 'stricmp', etc in c++11 mode.
298 append("-std=gnu++11" CMAKE_CXX_FLAGS)
299 else()
300 append("-std=c++11" CMAKE_CXX_FLAGS)
301 endif()
296302 else()
297303 message(FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported.")
298304 endif()