aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-09-10 09:01:53 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-09-10 09:01:53 +0200
commitc20011f985ef60855f99dc515b4d407aed0e1eab (patch)
treecbc2b042607c92744d78a0ee99204ef4225f2502
parent2b98a55d1f85684e525386dc27519d83d0b34e50 (diff)
downloadkernel-c20011f985ef60855f99dc515b4d407aed0e1eab.tar.xz
kernel-c20011f985ef60855f99dc515b4d407aed0e1eab.zip
build: include dynamic stack size in warnings
-rw-r--r--.clang-tidy2
-rw-r--r--CMakeLists.txt6
2 files changed, 5 insertions, 3 deletions
diff --git a/.clang-tidy b/.clang-tidy
index e110ab1f..6a12fccd 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -91,3 +91,5 @@ HeaderFilterRegex: "(arch|kernel|kapi|kstd)/.*\\.hpp"
SystemHeaders: true
RemovedArgs:
- -fcondition-coverage
+ExtraArgsBefore:
+ - -Wno-unknown-warning-option \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f622050..852ef690 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,13 +88,13 @@ if(NOT BUILD_TESTING)
add_compile_options(
"$<$<CXX_COMPILER_ID:GNU>:-fstack-usage>"
- "$<$<CXX_COMPILER_ID:GNU>:-Wframe-larger-than=${STACK_FRAME_LIMIT}>"
+ "$<$<CXX_COMPILER_ID:GNU>:-Wstack-usage=${STACK_FRAME_LIMIT}>"
)
add_link_options(
"$<$<CXX_COMPILER_ID:GNU>:-fstack-usage>"
- "$<$<CXX_COMPILER_ID:GNU>:-Wframe-larger-than=${STACK_FRAME_LIMIT}>"
- "$<$<CXX_COMPILER_ID:GNU>:-Werror=frame-larger-than=${STACK_FRAME_LIMIT}>"
+ "$<$<CXX_COMPILER_ID:GNU>:-Wstack-usage=${STACK_FRAME_LIMIT}>"
+ "$<$<CXX_COMPILER_ID:GNU>:-Werror=stack-usage=${STACK_FRAME_LIMIT}>"
)
unset(STACK_FRAME_LIMIT)