cmake: add "-Wno-atomic-alignment" flag to clang scripts

Clang outputs performance warnings by default for atomic operations with
access size more then 4 bytes. So add "-Wno-atomic-alignment add" flag to
ESP-IDF cmake script.
This commit is contained in:
Andrei Safronov 2022-03-25 15:30:48 +03:00 committed by Ivan Grokhotkov
parent fe1cf490b9
commit 50356cb073
No known key found for this signature in database
GPG Key ID: 1E050E141B280628

View File

@ -119,6 +119,9 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Multiple cases of attributes unknown to clang, for example
# __attribute__((optimize("-O3")))
list(APPEND compile_options "-Wno-unknown-attributes")
# Disable Clang warnings for atomic operations with access size
# more then 4 bytes
list(APPEND compile_options "-Wno-atomic-alignment")
# Clang also produces many -Wunused-function warnings which GCC doesn't.
# However these aren't treated as errors.
endif()