Files
RetroArch/samples/tasks/content_load/Makefile
LibretroAdmin 1e7f31890f runahead: the second instance's copy is opened by its copy task
The task that copies the core for run-ahead's second instance opens the
copy as well, on the worker under the threaded queue, and hands the
handle over with the path; the main thread takes it as it is and opens
the path itself only when the task could not. A copy discarded before
it is used is closed before it is deleted.

The runahead copy harness checks the task opens the copy once and hands
it over, a refused open still publishes the copy, and stale copies are
closed before they are deleted; its temp path check is portable to
Windows. The content_load harness creates a second instance of a
software core on the threaded queue against the real loader.
2026-10-04 07:51:53 +02:00

38 lines
1.2 KiB
Makefile

# See build.sh: this harness links the shipping RetroArch objects with
# only main() replaced, so it needs the project's own build rather than
# a source list of its own.
#
# SAN= selects which tree build to link, as the suite passes it:
# SAN=address (default) -> make SANITIZER=address,undefined DEBUG=1
# SAN=thread -> make SANITIZER=thread DEBUG=1
# SAN=none -> plain release build
# The matching tree build must exist first; build.sh says so if not.
TARGET := content_load_test
SAN ?= address
ifeq ($(SAN),address)
MAKE_ARGS := SANITIZER=address,undefined DEBUG=1
else ifeq ($(SAN),thread)
MAKE_ARGS := SANITIZER=thread DEBUG=1
else
MAKE_ARGS :=
endif
all:
@MAKE_ARGS="$(MAKE_ARGS)" ./build.sh
check: all
@ASAN_OPTIONS=detect_leaks=0:abort_on_error=1 \
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 \
TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1 \
./$(TARGET) > check.log 2>&1; rc=$$?; \
grep -vE '^\[(INFO|DEBUG|WARN|ERROR)\]' check.log; rm -f check.log; \
exit $$rc
clean:
rm -f $(TARGET) harness_core.so harness_core_noinit.so harness_core_nohw.so \
retroarch_nomain.o harness_main.o \
retroarch_nomain.d harness_main.d
.PHONY: all check clean