From 7eb73d766eb0167a77e53393f506bdb5910940dc Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 2 Apr 2020 16:39:22 +0200 Subject: [PATCH] Make compilation optimized unless debugging Note: I wanted to enable `-Og` on `develop`, but this generated warnings (thus, errors) that aren't in `-O0`. Needs further investigation, but annoyingly some of those are within `extern/` code, thus requiring different flags, which AFAIK is only possible (sanely) with GNU Make. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 62ccf886..b783f9c3 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ VERSION_STRING := `git describe --tags --dirty --always 2>/dev/null` WARNFLAGS := -Wall # Overridable CFLAGS -CFLAGS := -g -O0 +CFLAGS := -O3 # Non-overridable CFLAGS REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \ -D_DEFAULT_SOURCE -Iinclude @@ -224,7 +224,7 @@ develop: -fsanitize=unreachable -fsanitize=vla-bound \ -fsanitize=signed-integer-overflow -fsanitize=bounds \ -fsanitize=object-size -fsanitize=bool -fsanitize=enum \ - -fsanitize=alignment -fsanitize=null -DDEVELOP=1" + -fsanitize=alignment -fsanitize=null -DDEVELOP" CFLAGS="-g -O0" # Targets for the project maintainer to easily create Windows exes. # This is not for Windows users!