mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-21 12:29:43 -10:00
The sample and test builds used full debug info. -g1 keeps what sanitizer reports and backtraces need - function names, files and line numbers - and drops the variable and type information nobody reads in CI. Objects get about 30% smaller (rh265.o under ASan+UBSan: 5.1MB to 3.7MB), so the ccache caches hold more of each job's build and are quicker to restore and save.
26 lines
440 B
Makefile
26 lines
440 B
Makefile
TARGET := bps_patch_bounds_test
|
|
|
|
SOURCES := bps_patch_bounds_test.c
|
|
|
|
OBJS := $(SOURCES:.c=.o)
|
|
|
|
CFLAGS += -Wall -pedantic -std=gnu99 -g1 -O0
|
|
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS := -fsanitize=$(SANITIZER) -fno-omit-frame-pointer $(CFLAGS)
|
|
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
%.o: %.c
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -f $(TARGET) $(OBJS)
|
|
|
|
.PHONY: clean
|