Skip to content

Commit 88ebfcd

Browse files
committed
makefile: debug: work around clang crash for non -O0 compiles.
For now, debug builds will need -O0.
1 parent 9fa774e commit 88ebfcd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/makefile.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ endif
315315

316316
# define the compiler/assembler flags
317317
EZLLVMFLAGS = -mllvm -profile-guided-section-prefix=false -mllvm -z80-gas-style -ffunction-sections -fdata-sections -fno-addrsig -fno-autolink -fno-threadsafe-statics $(MATH_ERRNO)
318-
EZCOMMONFLAGS = -nostdinc -isystem $(call QUOTE_ARG,$(call FORWARD_PATH,$(CEDEV_TOOLCHAIN)/include)) -I$(SRCDIR) -Xclang -fforce-mangle-main-argc-argv $(EZLLVMFLAGS) -D__TICE__=1 $(CC_DEBUG) $(CC_CUSTOMFILE)
319-
EZCFLAGS = $(EZCOMMONFLAGS) $(CFLAGS)
320-
EZCXXFLAGS = $(EZCOMMONFLAGS) -isystem $(call QUOTE_ARG,$(call FORWARD_PATH,$(CEDEV_TOOLCHAIN)/include/c++)) -fno-exceptions -fno-use-cxa-atexit $(CXXFLAGS)
318+
EZCOMMONFLAGS = -nostdinc -isystem $(call QUOTE_ARG,$(call FORWARD_PATH,$(CEDEV_TOOLCHAIN)/include)) -I$(SRCDIR) -Xclang -fforce-mangle-main-argc-argv $(EZLLVMFLAGS) -D__TICE__=1 $(CC_CUSTOMFILE)
319+
EZCFLAGS = $(EZCOMMONFLAGS) $(CFLAGS) $(CC_DEBUG)
320+
EZCXXFLAGS = $(EZCOMMONFLAGS) -isystem $(call QUOTE_ARG,$(call FORWARD_PATH,$(CEDEV_TOOLCHAIN)/include/c++)) -fno-exceptions -fno-use-cxa-atexit $(CXXFLAGS) $(CC_DEBUG)
321321
EZLTOFLAGS = $(EZLLVMFLAGS) $(LTOFLAGS)
322322
EZASFLAGS = -march=ez80+full $(ASFLAGS)
323323

@@ -332,7 +332,7 @@ build: $(BUILD)
332332
target: $(BINDIR)/$(TARGET)
333333

334334
# this rule is trigged to build debug everything
335-
debug: CC_DEBUG = -DDEBUG=1 -Og -gdwarf-5 -g3
335+
debug: CC_DEBUG = -DDEBUG=1 -O0 -gdwarf-5 -g3
336336
debug: STRIP_CMD = $(NOOP)
337337
debug: LD_DEBUG = --defsym DEBUG=1
338338
debug: $(BUILD)

0 commit comments

Comments
 (0)