[compiler-rt] a12c076 - [compiler-rt] Use -std=c++17 for standalone build
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 12:04:45 PDT 2022
Author: Fangrui Song
Date: 2022-08-08T12:04:42-07:00
New Revision: a12c076f60a726ebe4605ea7d2784f531adfec76
URL: https://github.com/llvm/llvm-project/commit/a12c076f60a726ebe4605ea7d2784f531adfec76
DIFF: https://github.com/llvm/llvm-project/commit/a12c076f60a726ebe4605ea7d2784f531adfec76.diff
LOG: [compiler-rt] Use -std=c++17 for standalone build
Follow-up to D130689.
Reviewed By: thieta
Differential Revision: https://reviews.llvm.org/D131382
Added:
Modified:
compiler-rt/CMakeLists.txt
compiler-rt/cmake/config-ix.cmake
Removed:
################################################################################
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 62737735695f2..4f8e095c3b913 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -296,7 +296,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_CXX14_FLAG -std=c++14 CMAKE_CXX_FLAGS)
+append_string_if(COMPILER_RT_HAS_STD_CXX17_FLAG -std=c++17 CMAKE_CXX_FLAGS)
# Emulate C99 and C++11's __func__ for MSVC prior to 2013 CTP.
if(NOT COMPILER_RT_HAS_FUNC_SYMBOL)
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index cd45176cf2ba7..7be2ac201705a 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -81,7 +81,7 @@ check_cxx_compiler_flag(-fvisibility=hidden COMPILER_RT_HAS_FVISIBILITY_HIDDEN_
check_cxx_compiler_flag(-frtti COMPILER_RT_HAS_FRTTI_FLAG)
check_cxx_compiler_flag(-fno-rtti COMPILER_RT_HAS_FNO_RTTI_FLAG)
check_cxx_compiler_flag("-Werror -fno-function-sections" COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG)
-check_cxx_compiler_flag(-std=c++14 COMPILER_RT_HAS_STD_CXX14_FLAG)
+check_cxx_compiler_flag(-std=c++17 COMPILER_RT_HAS_STD_CXX17_FLAG)
check_cxx_compiler_flag(-ftls-model=initial-exec COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC)
check_cxx_compiler_flag(-fno-lto COMPILER_RT_HAS_FNO_LTO_FLAG)
check_cxx_compiler_flag(-fno-profile-generate COMPILER_RT_HAS_FNO_PROFILE_GENERATE_FLAG)
More information about the llvm-commits
mailing list