summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2018-10-01 01:00:11 +0000
committerEric Fiselier <eric@efcs.ca>2018-10-01 01:00:11 +0000
commit11edd935c8516f92841ca372aca86f20a002ce7f (patch)
treec7a801e614efc8e31af5951d62a3d86ef07f694c
parent47d0a37704ebc529ad2ab8a46e12a06e88df3207 (diff)
downloadbcm5719-llvm-11edd935c8516f92841ca372aca86f20a002ce7f.tar.gz
bcm5719-llvm-11edd935c8516f92841ca372aca86f20a002ce7f.zip
Attempt to unbreak Windows configuration.
Although libc++ doesn't yet support Windows we still have Windows builders to track our progress. Currently the clang-cl configuration seems broken because it doesn't support -std=c++11 and instead requires /std:c++11. This patch attempts to fix this. llvm-svn: 343431
-rw-r--r--libcxx/CMakeLists.txt5
-rw-r--r--libcxx/cmake/Modules/HandleLibcxxFlags.cmake1
2 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index c87e3562c3a..fb866e1ebc9 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -53,6 +53,7 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
if (MSVC)
set(LIBCXX_TARGETING_MSVC ON)
+ message(STATUS "Configuring for MSVC")
else()
set(LIBCXX_TARGETING_MSVC OFF)
endif()
@@ -504,8 +505,10 @@ if (LIBCXX_HAS_MUSL_LIBC)
set(LIBCXX_STANDARD_VER c++14 CACHE INTERNAL "internal option to change build dialect")
endif()
add_compile_flags_if_supported(-std=${LIBCXX_STANDARD_VER})
+add_compile_flags_if_supported("/std:${LIBCXX_STANDARD_VER}")
mangle_name("LIBCXX_SUPPORTS_STD_EQ_${LIBCXX_STANDARD_VER}_FLAG" SUPPORTS_DIALECT_NAME)
-if(NOT ${SUPPORTS_DIALECT_NAME})
+mangle_name("LIBCXX_SUPPORTS_STD_COLON_${LIBCXX_STANDARD_VER}_FLAG" SUPPORTS_DIALECT_NAME_MSVC)
+if(NOT ${SUPPORTS_DIALECT_NAME} AND NOT ${SUPPORTS_DIALECT_NAME_MSVC})
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" AND NOT "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
message(FATAL_ERROR "C++11 or greater is required but the compiler does not support ${LIBCXX_STANDARD_VER}")
endif()
diff --git a/libcxx/cmake/Modules/HandleLibcxxFlags.cmake b/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
index 65f7d187f3b..24fe0c5d5fb 100644
--- a/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
+++ b/libcxx/cmake/Modules/HandleLibcxxFlags.cmake
@@ -16,6 +16,7 @@ macro(mangle_name str output)
string(REGEX REPLACE "^-+" "" strippedStr "${strippedStr}")
string(REGEX REPLACE "-+$" "" strippedStr "${strippedStr}")
string(REPLACE "-" "_" strippedStr "${strippedStr}")
+ string(REPLACE ":" "_COLON_" strippedStr "${strippedStr}")
string(REPLACE "=" "_EQ_" strippedStr "${strippedStr}")
string(REPLACE "+" "X" strippedStr "${strippedStr}")
string(TOUPPER "${strippedStr}" ${output})
OpenPOWER on IntegriCloud