Skip to content

Commit

Permalink
unix/Makefile: Use -Og instead of -O0 for debug builds.
Browse files Browse the repository at this point in the history
For the coverage build this reduces the binary size to about 1/4 of its
size, and seems to help gcov/lcov coverage analysis so that it doesn't miss
lines.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Dec 9, 2021
1 parent efde4b2 commit 9ffb1ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/unix/Makefile
Expand Up @@ -44,7 +44,7 @@ CFLAGS += $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) -I$(VARIANT_DI

# Debugging/Optimization
ifdef DEBUG
COPT ?= -O0
COPT ?= -Og
else
COPT ?= -Os
COPT += -DNDEBUG
Expand Down

0 comments on commit 9ffb1ad

Please sign in to comment.