From d0f4c614b7b32bcf76d3b5f2d2faece72d43c835 Mon Sep 17 00:00:00 2001 From: Andrew Haberlandt Date: Mon, 29 Sep 2025 11:04:16 -0700 Subject: [PATCH] [sanitizer-common] sanitizer_common unit tests need -std=c++17 Currently, sanitizer_array_ref_test requires -std=c++17 or newer, due to is_trivially_copyable_v. This adds -std=c++17 to the list of CFLAGS used for compiling sanitizer_common tests. --- compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt index 55c7d665e639f..f79cd235fdca2 100644 --- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt @@ -78,6 +78,7 @@ set(SANITIZER_TEST_CFLAGS_COMMON -O2 -Werror=sign-compare -Wno-gnu-zero-variadic-macro-arguments + -std=c++17 ) set(SANITIZER_TEST_LINK_FLAGS_COMMON