Angepasste config
Some checks failed
Hello World (Multiplatform) / build (macos-12) (push) Has been cancelled
Hello World (Multiplatform) / build (macos-14) (push) Has been cancelled
Hello World (Multiplatform) / build (ubuntu-22.04) (push) Has been cancelled
Hello World (Multiplatform) / build (windows-2022) (push) Has been cancelled
Run tests with twister / twister-build-prep (push) Has been cancelled
Run tests with twister / twister-build (push) Has been cancelled
Run tests with twister / Publish Unit Tests Results (push) Has been cancelled
Run tests with twister / Check Twister Status (push) Has been cancelled

This commit is contained in:
Darquise 2024-06-16 21:12:11 +02:00
parent 58542a693b
commit a35cfeeadb
3 changed files with 8 additions and 4 deletions

View file

@ -159,8 +159,8 @@ endif()
# (supported by current gcc's as well)
#
if(CONFIG_CFI)
zephyr_compile_options(-flto)
target_compile_options(native_simulator INTERFACE "-flto")
zephyr_compile_options(-flto -fvisibility=hidden)
target_compile_options(native_simulator INTERFACE "-flto -fvisibility=hidden")
target_link_options(native_simulator INTERFACE "-flto")
list(APPEND LLVM_SANITIZERS "cfi")
endif()

View file

@ -1,4 +1,8 @@
CONFIG_GPIO=y
CONFIG_ASAN=y
#CONFIG_ASAN=y
CONFIG_CFI=y
#CONFIG_LLVM_USE_LLD=y
CONFIG_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_OPTIMIZATIONS=y

View file

@ -110,7 +110,7 @@ config GPROF
config CFI
bool "Build with control flow integrity sanitizer"
depends on ARCH_POSIX
depends on
help
Builds Zephyr with Address Sanitizer enabled. This is currently
only supported by boards based on the posix architecture, and requires a