zephyr/cmake/linker
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
..
arcmwdt
armlink cmake: userspace: A stab at USERSPACE + CMAKE_LINKER_GENERATOR 2025-03-27 17:17:03 +01:00
iar toolchain: iar: Fix sections placed at address 2025-04-15 11:25:07 +02:00
ld cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00
lld cmake: lld: Remove duplicate -fuse-ld=lld 2024-11-16 15:56:42 -05:00
xt-ld
linker_flags_template.cmake
linker_libraries_native.cmake
linker_libraries_template.cmake
linker_script_common.cmake cmake: userspace: A stab at USERSPACE + CMAKE_LINKER_GENERATOR 2025-03-27 17:17:03 +01:00
target_template.cmake