git.haldean.org ubik / 800b6a6
add an optimized release build Haldean Brown 4 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
66
77 UBIK_CFLAGS := -std=c11 -Werror -Wall -Wextra -Wswitch-enum \
88 -fno-strict-aliasing -pedantic -ggdb -rdynamic -I$(top)/include/ \
9 -O0 -D_GNU_SOURCE -fstack-protector-strong $(CFLAGS)
9 -D_GNU_SOURCE -fstack-protector-strong $(CFLAGS)
1010
11 ifneq ($(release),yes)
12 UBIK_CFLAGS := $(UBIK_CFLAGS) -O0
1113 ifneq ($(CC), musl-gcc)
1214 ifneq ($(sanitize),no)
1315 UBIK_CFLAGS := $(UBIK_CFLAGS) -fsanitize=address -fsanitize=leak -fsanitize=undefined
1416 endif
1517 endif
18 else
19 UBIK_CFLAGS := $(UBIK_CFLAGS) -O3
20 endif
21
1622
1723 UBIK_LDFLAGS := -rdynamic -ldl -pthread $(LDFLAGS)
1824 LINK_LIBUBIK = -Wl,--whole-archive $(top)/libubik/libubik.a -Wl,--no-whole-archive