Commit dc936092 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis
Browse files

cmake: clang: Override -Wno-volatile with -Wno-deprecated-volatile

Override the GCC-specific `-Wno-volatile` flag specified by GCC
`compiler_flags.cmake` with the Clang-equivalent
`-Wno-deprecated-volatile`.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent 6f5906b6
Loading
Loading
Loading
Loading
+9 −0
Changes for cmake/compiler/clang/compiler_flags.cmake: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3,6 +3,15 @@ include(${ZEPHYR_BASE}/cmake/compiler/gcc/compiler_flags.cmake)

# Now, let's overwrite the flags that are different in clang.

set_property(TARGET compiler-cpp PROPERTY dialect_cpp2a "-std=c++2a"
  "-Wno-register" "-Wno-deprecated-volatile")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp20 "-std=c++20"
  "-Wno-register" "-Wno-deprecated-volatile")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp2b "-std=c++2b"
  "-Wno-register" "-Wno-deprecated-volatile")
set_property(TARGET compiler-cpp PROPERTY dialect_cpp23 "-std=c++23"
  "-Wno-register" "-Wno-deprecated-volatile")

# No property flag, clang doesn't understand fortify at all
set_compiler_property(PROPERTY security_fortify_compile_time)
set_compiler_property(PROPERTY security_fortify_run_time)