[libunwind] [libunwind] Bump to CXX_STANDARD 17 (PR #75986)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 19 16:03:32 PST 2023
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/75986
libunwind uses C-style and low-level C++, so the language standard
doesn't matter that much, but bumping to C++17 aligns with the rest of
LLVM and enables some features that would cause pedantic warnings in
C++11 (e.g. -Wc++17-attribute-extensions for [[fallthrough]]/
[[nodiscard]]/[[maybe_unused]]). (Contributors might use these features
unaware of the pedantic warnings).
Suggested-by: Christopher Di Bella <cjdb at google.com>
>From 14387536c363d67447431dcbf5ae841a1531bec0 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Tue, 19 Dec 2023 15:54:12 -0800
Subject: [PATCH] [libunwind] Bump to CXX_STANDARD 17
libunwind uses C-style and low-level C++, so the language standard
doesn't matter that much, but bumping to C++17 aligns with the rest of
LLVM and enables some features that would cause pedantic warnings in
C++11 (e.g. -Wc++17-attribute-extensions for [[fallthrough]]/
[[nodiscard]]/[[maybe_unused]]). (Contributors might use these features
unaware of the pedantic warnings).
Suggested-by: Christopher Di Bella <cjdb at google.com>
---
libunwind/src/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 570824260465d6..9c6f5d908b0945 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -154,7 +154,7 @@ target_link_libraries(unwind_shared_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRA
set_target_properties(unwind_shared_objects
PROPERTIES
CXX_EXTENSIONS OFF
- CXX_STANDARD 11
+ CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}"
)
@@ -194,7 +194,7 @@ target_link_libraries(unwind_static_objects PUBLIC "${LIBUNWIND_ADDITIONAL_LIBRA
set_target_properties(unwind_static_objects
PROPERTIES
CXX_EXTENSIONS OFF
- CXX_STANDARD 11
+ CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}"
)
More information about the cfe-commits
mailing list