mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-22 10:50:15 -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
958 B
Makefile
26 lines
958 B
Makefile
# Bounds on net_http's DNS cache and connection pool, and the socket
|
|
# family fallback: net_http.c included whole, clock and sockets stubbed.
|
|
TARGET := http_limits_test
|
|
ROOT := ../../..
|
|
THREADS ?= 1
|
|
CFLAGS += -std=gnu89 -Wall -g1 -O1 -flto -ffunction-sections -fdata-sections \
|
|
-I$(ROOT)/libretro-common/include
|
|
LDFLAGS += -Wl,--gc-sections
|
|
LDLIBS += -lpthread
|
|
ifeq ($(THREADS),1)
|
|
CFLAGS += -DHAVE_THREADS
|
|
endif
|
|
ifneq ($(SANITIZER),)
|
|
CFLAGS += -fsanitize=$(SANITIZER) -fno-omit-frame-pointer
|
|
LDFLAGS += -fsanitize=$(SANITIZER)
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
$(TARGET): http_limits_test.c $(ROOT)/libretro-common/net/net_http.c
|
|
$(CC) $(CFLAGS) $< $(ROOT)/libretro-common/rthreads/rthreads.c $(ROOT)/libretro-common/rthreads/retro_eventcount.c $(ROOT)/libretro-common/string/stdstring.c $(ROOT)/libretro-common/encodings/encoding_base64.c $(LDFLAGS) $(LDLIBS) -o $@
|
|
check: $(TARGET)
|
|
./$(TARGET)
|
|
clean:
|
|
rm -f $(TARGET) $(TARGET).exe
|
|
.PHONY: all check clean
|