[llvm] r203701 - Use -std=gnu++11 on cygwin and mingw.
Rafael Espindola
rafael.espindola at gmail.com
Wed Mar 12 13:01:15 PDT 2014
Author: rafael
Date: Wed Mar 12 15:01:15 2014
New Revision: 203701
URL: http://llvm.org/viewvc/llvm-project?rev=203701&view=rev
Log:
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.
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=203701&r1=203700&r2=203701&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Wed Mar 12 15:01:15 2014
@@ -322,7 +322,13 @@ endif
ifeq ($(ENABLE_CXX1Y),1)
CXX.Flags += -std=c++1y
else
- CXX.Flags += -std=c++11
+ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ # MinGW and Cygwin are a bit stricter and lack things like
+ # 'strdup', 'stricmp', etc in c++11 mode.
+ CXX.Flags += -std=gnu++11
+ else
+ CXX.Flags += -std=c++11
+ endif
endif
ifeq ($(ENABLE_WERROR),1)
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=203701&r1=203700&r2=203701&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Wed Mar 12 15:01:15 2014
@@ -293,7 +293,13 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE
else()
check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11)
if (CXX_SUPPORTS_CXX11)
- append("-std=c++11" CMAKE_CXX_FLAGS)
+ if (CYGWIN OR MINGW)
+ # MinGW and Cygwin are a bit stricter and lack things like
+ # 'strdup', 'stricmp', etc in c++11 mode.
+ append("-std=gnu++11" CMAKE_CXX_FLAGS)
+ else()
+ append("-std=c++11" CMAKE_CXX_FLAGS)
+ endif()
else()
message(FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported.")
endif()
More information about the llvm-commits
mailing list