toolchain: Move extra warning options to toolchain abstraction
Move extra warning option from generic twister script into compiler-dependent config files. ARCMWDT compiler doesn't support extra warning options ex. "-Wl,--fatal-warnings". To avoid build fails flag "disable_warnings_as_errors" should be passed to twister. This allows all warning messages and make atomatic test useles. Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
This commit is contained in:
parent
a28dba2503
commit
0dec4cf927
10 changed files with 40 additions and 8 deletions
|
@ -156,6 +156,13 @@ endif()
|
|||
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,no_strict_aliasing>>)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:compiler-cpp,no_strict_aliasing>>)
|
||||
|
||||
# Extra warnings options for twister run
|
||||
if (CONFIG_COMPILER_WARNINGS_AS_ERRORS)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:C>:$<TARGET_PROPERTY:compiler,warnings_as_errors>>)
|
||||
zephyr_compile_options($<$<COMPILE_LANGUAGE:ASM>:$<TARGET_PROPERTY:asm,warnings_as_errors>>)
|
||||
zephyr_link_libraries($<TARGET_PROPERTY:linker,warnings_as_errors>)
|
||||
endif()
|
||||
|
||||
# @Intent: Set compiler flags to enable buffer overflow checks in libc functions
|
||||
# @details:
|
||||
# Kconfig.zephyr "Detect buffer overflows in libc calls" is a kconfig choice,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue