diff --git a/makefiles/toolchain/llvm.inc.mk b/makefiles/toolchain/llvm.inc.mk index 4cf21d361b..496c3c0d39 100644 --- a/makefiles/toolchain/llvm.inc.mk +++ b/makefiles/toolchain/llvm.inc.mk @@ -72,6 +72,18 @@ ifneq (,$(TARGET_ARCH)) CXXINCLUDES += $(GCC_CXX_INCLUDES) endif +# For bare metal targets the performance penalty of atomic operations being +# implemented with library calls is totally insignificant. In case LTO is +# is enabled, the overhead compared to manually disabling interrupts is fully +# optimized out (unless atomic operations could be grouped together to a single +# critical section). So there is - in our use case - no value in having the +# warning +CFLAGS += -Wno-atomic-alignment + +# For compatibility with older clang versions we also disable warnings on +# unsupported warning flags: +CFLAGS += -Wno-unknown-warning-option + OPTIONAL_CFLAGS_BLACKLIST += -fno-delete-null-pointer-checks OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation