Skip to content

Commit

Permalink
cmake: compiler/xt-clang: add -Wno-unknown-warning-option
Browse files Browse the repository at this point in the history
xt-clang is usually based on older version of clang, and
Zephyr main targets more recent versions. Because of this,
some newer compiler flags may cause warnings where twister
would mark as test being failed. To workaround that,
add -Wno-unknown-warning-option to suppress those warnings.

Fixes zephyrproject-rtos#84138

Signed-off-by: Daniel Leung <[email protected]>
  • Loading branch information
dcpleung committed Jan 17, 2025
1 parent 2a6e590 commit 5607d58
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmake/compiler/xt-clang/compiler_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ set_compiler_property(PROPERTY no_position_independent "")

# Remove after testing that -Wshadow works
set_compiler_property(PROPERTY warning_shadow_variables)

# xt-clang is usually based on older version of clang, and
# Zephyr main targets more recent versions. Because of this,
# some newer compiler flags may cause warnings where twister
# would mark as test being failed. To workaround that,
# add -Wno-unknown-warning-option to suppress those warnings.
check_set_compiler_property(APPEND PROPERTY warning_extended
-Wno-unknown-warning-option
)

0 comments on commit 5607d58

Please sign in to comment.