Require C++17

Policy information:
https://opensource.google/documentation/policies/cplusplus-support#c_language_standard
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md

PiperOrigin-RevId: 723589409
Change-Id: Ia8665c052ed40f2a78308f7eb0c330191b0cf981
This commit is contained in:
Derek Mauro
2025-02-05 11:31:42 -08:00
committed by Copybara-Service
parent 69b58f9227
commit 7a03cdb4c0
19 changed files with 49 additions and 41 deletions

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17 c++20"
STD="c++17 c++20"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17 c++20"
STD="c++17 c++20"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17 c++20"
STD="c++17 c++20"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17 c++20"
STD="c++17 c++20"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17"
STD="c++17"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -24,8 +24,11 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
ABSEIL_ROOT="$(realpath $(dirname ${0})/..)"
fi
# TODO(absl-team): Update to linux_gcc-floor GCC8. C++17 support was incomplete
# in GCC7, so for now this script will trivally pass.
exit 0
if [[ -z ${STD:-} ]]; then
STD="c++14"
STD="c++17"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -25,7 +25,7 @@ if [[ -z ${ABSEIL_ROOT:-} ]]; then
fi
if [[ -z ${STD:-} ]]; then
STD="c++14 c++17 c++20"
STD="c++17 c++20"
fi
if [[ -z ${COMPILATION_MODE:-} ]]; then

View File

@@ -23,7 +23,7 @@ fi
source "${ABSEIL_ROOT}/ci/cmake_common.sh"
if [[ -z ${ABSL_CMAKE_CXX_STANDARDS:-} ]]; then
ABSL_CMAKE_CXX_STANDARDS="14 17 20"
ABSL_CMAKE_CXX_STANDARDS="17 20"
fi
if [[ -z ${ABSL_CMAKE_BUILD_TYPES:-} ]]; then

View File

@@ -23,7 +23,7 @@ fi
source "${ABSEIL_ROOT}/ci/cmake_common.sh"
if [[ -z ${ABSL_CMAKE_CXX_STANDARDS:-} ]]; then
ABSL_CMAKE_CXX_STANDARDS="14 17"
ABSL_CMAKE_CXX_STANDARDS="17"
fi
if [[ -z ${ABSL_CMAKE_BUILD_TYPES:-} ]]; then

View File

@@ -19,6 +19,9 @@
set -euox pipefail
# Use Xcode 16.0
sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer
if [[ -z ${ABSEIL_ROOT:-} ]]; then
ABSEIL_ROOT="$(realpath $(dirname ${0})/..)"
fi
@@ -58,7 +61,7 @@ brew uninstall google-benchmark
${BAZEL_BIN} test ... \
--copt="-DGTEST_REMOVE_LEGACY_TEST_CASEAPI_=1" \
--copt="-Werror" \
--cxxopt="-std=c++14" \
--cxxopt="-std=c++17" \
--enable_bzlmod=true \
--features=external_include_paths \
--keep_going \

View File

@@ -16,6 +16,12 @@
set -euox pipefail
# Use Xcode 16.0
sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
export CTEST_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
if [[ -z ${ABSEIL_ROOT:-} ]]; then
ABSEIL_ROOT="$(dirname ${0})/.."
fi
@@ -53,7 +59,7 @@ for compilation_mode in ${ABSL_CMAKE_BUILD_TYPES}; do
-DBUILD_SHARED_LIBS=${build_shared} \
-DABSL_BUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=${compilation_mode} \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--no-undefined" \
-DABSL_BUILD_MONOLITHIC_SHARED_LIBS=${monolithic_shared} \
-DABSL_GOOGLETEST_DOWNLOAD_URL="${ABSL_GOOGLETEST_DOWNLOAD_URL}"

View File

@@ -21,10 +21,10 @@ SET BAZEL_LLVM=C:\Program Files\LLVM
CD %~dp0\..
if %errorlevel% neq 0 EXIT /B 1
:: Set the standard version, [c++14|c++17|c++20|c++latest]
:: Set the standard version, [c++17|c++20|c++latest]
:: https://msdn.microsoft.com/en-us/library/mt490614.aspx
:: The default is c++14 if not set on command line.
IF "%STD%"=="" SET STD=c++14
:: The default is c++17 if not set on command line.
IF "%STD%"=="" SET STD=c++17
:: Set the compilation_mode (fastbuild|opt|dbg)
:: https://docs.bazel.build/versions/master/user-manual.html#flag--compilation_mode

View File

@@ -18,10 +18,10 @@ SETLOCAL ENABLEDELAYEDEXPANSION
CD %~dp0\..
if %errorlevel% neq 0 EXIT /B 1
:: Set the standard version, [c++14|c++latest]
:: Set the standard version, [c++17|c++latest]
:: https://msdn.microsoft.com/en-us/library/mt490614.aspx
:: The default is c++14 if not set on command line.
IF "%STD%"=="" SET STD=c++14
:: The default is c++17 if not set on command line.
IF "%STD%"=="" SET STD=c++17
:: Set the compilation_mode (fastbuild|opt|dbg)
:: https://docs.bazel.build/versions/master/user-manual.html#flag--compilation_mode