From ce7d01b52ebd1d8247a592c4b483f865cffc80ad Mon Sep 17 00:00:00 2001 From: Andrei Safronov Date: Fri, 25 Mar 2022 15:30:48 +0300 Subject: [PATCH] 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. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04fb12f481..12170d526a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,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()