kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

commit b00bb7a949692054e8d4258003e64db1fb66f470
parent 2f9f6ad15b39f93e6ffef11a1824d580dc780ab2
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Wed, 17 Jun 2026 14:01:52 -0700

mk/port: rebuild corpus runners before the cross lanes

`test-cross` depended only on `bin`, and cross_test.sh / test/parse/run.sh only
check that parse-runner exists, never that it is current. So a libkit change that
was built into `kit` but not into the (separately-linked) parse-runner left the
cross lane running a stale runner against fresh codegen — which reported a false
`gnu_labels_as_values_threaded/O1/emit` failure ("opt native emit: no scratch
register") for a bug already fixed in libkit. List $(PARSE_RUNNER) and
$(LINK_EXE_RUNNER) (both depend on $(LIB_AR)) as test-cross prerequisites so make
relinks them first. The toy lane drives $(BIN) directly, so `bin` already covers
it.

Diffstat:
Mmk/port.mk | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mk/port.mk b/mk/port.mk @@ -38,7 +38,13 @@ VERIFY ?= 0 test-port: test-cross test-selfhost -test-cross: bin +# The corpus runners depend on $(LIB_AR); list them so a libkit change rebuilds +# them before the cross lanes run. cross_test.sh only checks the runners exist +# (test/parse/run.sh errors when missing but not when stale), so without these +# prereqs a stale parse-runner can run against fresh codegen and report a false +# pass/fail (e.g. an "opt native emit" error already fixed in libkit). The toy +# lane drives $(BIN) directly and so is covered by `bin`. +test-cross: bin $(PARSE_RUNNER) $(LINK_EXE_RUNNER) @KIT='$(abspath $(BIN))' KIT_VM='$(KIT_VM)' KIT_CROSS_RUN='$(RUN)' \ bash scripts/cross_test.sh '$(TARGET)' '$(DEPTH)'