summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-08-15 04:42:15 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-08-15 04:42:15 +0000
commitd852eca8f12c5dd395118ea8ab059eaad02e9414 (patch)
treee6d7a664da22f98c5d29b480a5249195dce42f0f /CMakeLists.txt
parent91697db2cd12df57c386216ce7885a2945596352 (diff)
downloadcompiler-rt-d852eca8f12c5dd395118ea8ab059eaad02e9414.tar.gz
[CMake] Check for C++14 instead of C++11
Now that LLVM moved to C++14, `COMPILER_RT_HAS_STD_CXX11_FLAG` should become `COMPILER_RT_HAS_STD_CXX14_FLAG`. I ran into this issue when replacing llvm::make_unique with std::make_unique in an X-ray unit test. We are correctly passing `-std=c++14`, but this got overwritten further down the invocation by the compiler-rt flags. Given that this unit test is using LLVM headers, this is bound to break sooner than later, regardless of my change. Differential revision: https://reviews.llvm.org/D66271 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@368960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b01ab501..f417f81de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,7 +254,7 @@ if(COMPILER_RT_ENABLE_WERROR)
append_string_if(COMPILER_RT_HAS_WX_FLAG /WX CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
-append_string_if(COMPILER_RT_HAS_STD_CXX11_FLAG -std=c++11 CMAKE_CXX_FLAGS)
+append_string_if(COMPILER_RT_HAS_STD_CXX14_FLAG -std=c++14 CMAKE_CXX_FLAGS)
# Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP.
if(NOT COMPILER_RT_HAS_FUNC_SYMBOL)