zephyr/cmake
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
..
app
bintools toolchain: iar: Add experimental IAR support 2025-02-14 19:12:44 +00:00
compiler cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00
emu cmake/emu: Use environment variable value on message about it 2025-04-24 16:54:00 +02:00
flash cmake: flash: update cmake to support rtt target 2024-11-21 11:01:55 +00:00
ide build: namespace autoconf.h with zephyr/ 2024-05-28 22:03:55 +02:00
linker cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00
linker_script cmake: arm: linker: remove usage of ld-specific ADDR() function 2025-04-24 16:54:14 +02:00
makefile_exports
modules dts: Move vendor-specific dtsi to dedicated folder 2025-04-29 13:00:03 +02:00
reports cmake: reports: Fix file prefix for tfm/bl2 2025-02-24 15:36:45 +00:00
sca sca: gcc: add support for additional analyzer options 2025-03-13 16:53:26 +00:00
toolchain cmake: toolchain/xcc,xt-clang: LD flag for multi-core env vars 2025-04-30 23:02:56 +02:00
usage cmake: targets: usage: add missing custom targets 2024-08-31 06:46:44 -04:00
util
cfb.cmake
extra_flags.cmake cmake: extra_flags: Use zephyr_get 2023-10-24 11:35:27 +02:00
gcc-m-cpu.cmake arch: arm: Add Cortex-A7 support 2025-04-04 09:35:03 +02:00
gcc-m-fpu.cmake arch: arm: Add Cortex-A7 support 2025-04-04 09:35:03 +02:00
gen_version_h.cmake cmake: Create git module 2024-09-12 10:04:05 +02:00
kobj.cmake build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
llext-edk.cmake llext-edk: fix BOARD_TARGET variable generation to be Zephyr-compatible 2025-04-02 19:02:45 +02:00
mcuboot.cmake mcuboot: Kconfig options for single app slot RAM loading mode 2025-04-08 16:12:33 +02:00
package_helper.cmake cmake: move script mode handling from package helper to extensions.cmake 2024-10-08 17:00:30 +02:00
pristine.cmake
target_toolchain_flags.cmake cmake: source dedicated linker library properties for native builds 2024-11-16 15:28:20 -05:00
verify-toolchain.cmake
vif.cmake
yaml-filter.cmake cmake: yaml: switch to yaml for intermediate file 2025-04-10 10:11:47 +02:00