summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-03-12 20:01:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-03-12 20:01:15 +0000
commit8b35074e09a07e1ada98b5f5f43c3f8f1f370c4a (patch)
treeb5462ac09259d4de1dc77aacc3993c2e81ffa22d /llvm/cmake
parentb04800724370ffe7e087b5f6357d1f19d821beec (diff)
downloadbcm5719-llvm-8b35074e09a07e1ada98b5f5f43c3f8f1f370c4a.tar.gz
bcm5719-llvm-8b35074e09a07e1ada98b5f5f43c3f8f1f370c4a.zip
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. llvm-svn: 203701
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index ccf5f90f17c..319adf3f325 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -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()
OpenPOWER on IntegriCloud