Skip to content

Commit 4b5ceb9

Browse files
dcpleungkartben
authored andcommitted
cmake: compiler/xt-clang: add -Wno-unknown-warning-option
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 #84138 Signed-off-by: Daniel Leung <[email protected]>
1 parent 69ce6af commit 4b5ceb9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/compiler/xt-clang/compiler_flags.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,12 @@ set_compiler_property(PROPERTY no_position_independent "")
3434

3535
# Remove after testing that -Wshadow works
3636
set_compiler_property(PROPERTY warning_shadow_variables)
37+
38+
# xt-clang is usually based on older version of clang, and
39+
# Zephyr main targets more recent versions. Because of this,
40+
# some newer compiler flags may cause warnings where twister
41+
# would mark as test being failed. To workaround that,
42+
# add -Wno-unknown-warning-option to suppress those warnings.
43+
check_set_compiler_property(APPEND PROPERTY warning_extended
44+
-Wno-unknown-warning-option
45+
)

0 commit comments

Comments
 (0)