Commit e03e52d26e5d06435e8e033283317aa35b65ca35

Steffen Jaeckel 2022-04-28T11:44:00

ensure compilation with Clang succeeds Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/makefile_include.mk b/makefile_include.mk
index dca5c3b..f88d18b 100644
--- a/makefile_include.mk
+++ b/makefile_include.mk
@@ -95,6 +95,10 @@ endif # COMPILE_SIZE
 
 ifneq ($(findstring clang,$(CC)),)
 LTM_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
+ifdef IGNORE_SPEED
+#for dead code eliminiation
+LTM_CFLAGS += -O1
+endif
 endif
 ifneq ($(findstring mingw,$(CC)),)
 LTM_CFLAGS += -Wno-shadow