sparse: add sparse support
With this adding "-DSPARSE=y" to the "west build" command line performs a sparse check of the project build. So far only gcc-based builds are supported. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
parent
725ce535f2
commit
7a85ff7683
5 changed files with 45 additions and 2 deletions
|
@ -267,6 +267,10 @@ if(CONFIG_COMPILER_COLOR_DIAGNOSTICS)
|
|||
zephyr_compile_options($<TARGET_PROPERTY:compiler,diagnostic>)
|
||||
endif()
|
||||
|
||||
if("${SPARSE}" STREQUAL "y")
|
||||
list(APPEND TOOLCHAIN_C_FLAGS -D__CHECKER__)
|
||||
endif()
|
||||
|
||||
zephyr_compile_options(
|
||||
${TOOLCHAIN_C_FLAGS}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue