]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: Simplify sanitizer setup
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 27 Nov 2024 19:20:51 +0000 (20:20 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 29 Nov 2024 00:40:36 +0000 (00:40 +0000)
Let's get rid of 20-sanitizers.conf and just move it into
mkosi.sanitizers instead.

mkosi.conf
mkosi.conf.d/20-sanitizers.conf [deleted file]
mkosi.sanitizers/mkosi.conf

index 94c8697ded3aa2c9b5d3ce036f499521e4ffc60e..835b1d4b9c9a5064ce5172f3bd58b1669760008c 100644 (file)
@@ -147,3 +147,6 @@ QemuSmp=2
 QemuSwtpm=yes
 QemuVsock=yes
 QemuKvm=yes
+
+[Include]
+Include=%D/mkosi.sanitizers
diff --git a/mkosi.conf.d/20-sanitizers.conf b/mkosi.conf.d/20-sanitizers.conf
deleted file mode 100644 (file)
index ecbb02b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-or-later
-
-[Match]
-Environment=SANITIZERS
-Environment=!SANITIZERS=
-
-[Build]
-# Set verify_asan_link_order=0 to prevent ASAN warnings when building the image and make sure the real ASAN
-# options are set when booting the image.
-# Set intercept_tls_get_addr=0 to work around leak sanitizer segmentation fault in test-dlopen-so on CentOS
-# Stream 9.
-# TODO: Drop intercept_tls_get_addr=0 when we remove CentOS Stream 9 builds.
-Environment=ASAN_OPTIONS=verify_asan_link_order=0:intercept_tls_get_addr=0
-
-[Content]
-KernelCommandLine=
-        ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
-        systemd.setenv=ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
-        UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
-        systemd.setenv=UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
-        LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions
-        systemd.setenv=LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions
-
-[Include]
-Include=%D/mkosi.sanitizers
index 844541ce8b4ed8229115eb3a5fad4a4fdbefdbfc..0137d4e38d6438f944a95139b8157f1844bb727c 100644 (file)
@@ -3,3 +3,20 @@
 [Match]
 Environment=SANITIZERS
 Environment=!SANITIZERS=
+
+[Build]
+# Set verify_asan_link_order=0 to prevent ASAN warnings when building the image and make sure the real ASAN
+# options are set when booting the image.
+# Set intercept_tls_get_addr=0 to work around leak sanitizer segmentation fault in test-dlopen-so on CentOS
+# Stream 9.
+# TODO: Drop intercept_tls_get_addr=0 when we remove CentOS Stream 9 builds.
+Environment=ASAN_OPTIONS=verify_asan_link_order=0:intercept_tls_get_addr=0
+
+[Content]
+KernelCommandLine=
+        ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
+        systemd.setenv=ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1
+        UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
+        systemd.setenv=UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1
+        LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions
+        systemd.setenv=LSAN_OPTIONS=suppressions=/usr/lib/systemd/leak-sanitizer-suppressions