From 736c7f33d9433c66ae91a45c5f57183839f50762 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 1 Feb 2022 13:19:46 -0800 Subject: [PATCH] make the simulator smaller (#3869) * small sim * o2 is ok --- simulator/Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/simulator/Makefile b/simulator/Makefile index c68f385a04..30e15b1f1b 100644 --- a/simulator/Makefile +++ b/simulator/Makefile @@ -39,17 +39,15 @@ endif # Compiler options here. ifeq ($(USE_OPT),) -# this config if debugging is needed, but the binary is about 50M -# USE_OPT = -Wall -ggdb -Werror-implicit-function-declaration -Werror -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=write-strings -Wno-error=strict-aliasing -# USE_OPT = -Wall -O0 -ggdb -g -Wno-error=implicit-fallthrough -Werror-implicit-function-declaration -Wno-error=pointer-sign -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=sign-compare -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-error=write-strings -# this config producec a smaller binary file -# 7.3 compiler would want -Wno-error=implicit-fallthrough while 6.4 does not know about it -# see https://github.com/rusefi/rusefi/issues/517 - USE_OPT = -Wall -O2 -g -Wno-error=implicit-fallthrough -Wno-error=write-strings -Wno-error=strict-aliasing + USE_OPT = -Wall -Wno-error=implicit-fallthrough -Wno-error=write-strings -Wno-error=strict-aliasing + +# If you would like to debug the simulator, swap which of these lines is commented. It's commented because debug info causes a 10-15x increase in binary size. + USE_OPT += -O2 +# USE_OPT += -O0 -g ifeq ($(OS),Windows_NT) else - USE_OPT += -m32 + USE_OPT += -m32 endif endif