Skip to content

Commit

Permalink
build: adjust initialized build CFLAGS to release settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jaromil committed Dec 2, 2024
1 parent c5c214d commit ac8a97a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions build/init.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,11 @@ CURRENT_YEAR := $(shell date +%Y)
CC ?= gcc
cc := ${CC}

ifdef CCACHE
cc := ccache ${cc}
endif

CFLAGS ?= -Og -ggdb -DDEBUG=1 -Wall -Wextra

cflags_includes := -Isrc -Ilib/tinycc
cflags_gnu := -DLIBC_GNU -D_GNU_SOURCE
cflags_stack_protect := -fstack-protector-all -D_FORTIFY_SOURCE=2 -fno-strict-overflow

ifdef RELEASE
CFLAGS := -O2 -fomit-frame-pointer ${cflags_stack_protect}
endif
CFLAGS ?= -O2 -fomit-frame-pointer ${cflags_stack_protect}

cflags := ${CFLAGS} ${cflags_includes}

Expand Down

0 comments on commit ac8a97a

Please sign in to comment.