zephyr/cmake/linker/ld
Keith Packard 2d64237f44 cmake: Enable undefined behavior sanitizer on all targets
GCC and Clang support the undefined behavior sanitizer in any
configuration, the only restriction is that if you want to get nice
messages printed, then you need the ubsan library routines which are only
present for posix architecture or when using picolibc.

This patch adds three new compiler properties:

 * sanitizer_undefined. Enables the undefined behavior sanitizer.
 * sanitizer_undefined_library. Calls ubsan library routines on fault.
 * sanitizer_undefined_trap. Invokes __builtin_trap() on fault.

Overhead for using the trapping sanitizer is fairly low and should be
considered for use in CI once all of the undefined behavior faults in
Zephyr are fixed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-02 01:16:18 +02:00
..
clang
gcc Revert "cmake: remove enforcement of DWARF v4" 2024-12-20 16:05:23 +01:00
host-gcc
ld_script.cmake cmake: linker generator: ld: Files for section input patterns 2025-03-27 17:17:03 +01:00
linker_flags.cmake cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00
linker_libraries.cmake cmake: source dedicated linker library properties for native builds 2024-11-16 15:28:20 -05:00
target_configure.cmake
target_relocation.cmake cmake: extensions: use INTERFACE_SOURCES as property for code relocation 2024-11-16 13:35:36 -05:00
target.cmake cmake: userspace: A stab at USERSPACE + CMAKE_LINKER_GENERATOR 2025-03-27 17:17:03 +01:00