mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
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.
This commit is contained in:
4
Makefile
4
Makefile
@@ -32,7 +32,7 @@ VERSION_STRING := `git describe --tags --dirty --always 2>/dev/null`
|
|||||||
WARNFLAGS := -Wall
|
WARNFLAGS := -Wall
|
||||||
|
|
||||||
# Overridable CFLAGS
|
# Overridable CFLAGS
|
||||||
CFLAGS := -g -O0
|
CFLAGS := -O3
|
||||||
# Non-overridable CFLAGS
|
# Non-overridable CFLAGS
|
||||||
REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \
|
REALCFLAGS := ${CFLAGS} ${WARNFLAGS} -std=c11 -D_POSIX_C_SOURCE=200809L \
|
||||||
-D_DEFAULT_SOURCE -Iinclude
|
-D_DEFAULT_SOURCE -Iinclude
|
||||||
@@ -224,7 +224,7 @@ develop:
|
|||||||
-fsanitize=unreachable -fsanitize=vla-bound \
|
-fsanitize=unreachable -fsanitize=vla-bound \
|
||||||
-fsanitize=signed-integer-overflow -fsanitize=bounds \
|
-fsanitize=signed-integer-overflow -fsanitize=bounds \
|
||||||
-fsanitize=object-size -fsanitize=bool -fsanitize=enum \
|
-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.
|
# Targets for the project maintainer to easily create Windows exes.
|
||||||
# This is not for Windows users!
|
# This is not for Windows users!
|
||||||
|
|||||||
Reference in New Issue
Block a user