mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 00:36:42 -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.
30 lines
745 B
Makefile
30 lines
745 B
Makefile
TARGET := keymaps_lut_test
|
|
|
|
REPO_ROOT := ../../..
|
|
|
|
# input/input_keymaps.c is compiled into the test (it reaches the
|
|
# file's static table); no platform's key headers are pulled in.
|
|
CFLAGS += -Wall -Wno-unused-function -std=gnu99 -g1 -O1 -DRARCH_INTERNAL \
|
|
-I$(REPO_ROOT)/libretro-common/include -I$(REPO_ROOT)
|
|
|
|
SOURCES := keymaps_lut_test.c \
|
|
$(REPO_ROOT)/libretro-common/compat/compat_strl.c
|
|
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
|
LDFLAGS += -fsanitize=$(SANITIZER)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(SOURCES) $(REPO_ROOT)/input/input_keymaps.c
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $(LDFLAGS)
|
|
|
|
check: all
|
|
./$(TARGET)
|
|
|
|
clean:
|
|
rm -f $(TARGET) $(TARGET).exe
|
|
|
|
.PHONY: all check clean
|