Files
sx/examples/1638-platform-target-host.sx
agra c88f4fbcef test(asm): Phase 0.0 — corpus target-gating + .build JSON config
Adds per-example build/run directives to the corpus runner via an optional
`expected/<name>.build` JSON sidecar (`BuildConfig { aot, target }`), replacing
the standalone `.aot` marker. Threads `--target` into the run/build/ir spawns
and gates the execute path on host arch+os match; a cross-target example fails
loudly ("ir-only mode not yet implemented") pending Phase 0.1.

- corpus_run.test.zig: BuildConfig + std.json parse (unknown-key => error),
  hostMatchesTarget (shorthand-expand + arch/os token match, arm64->aarch64),
  withTarget argv helper; unit tests for both.
- migrate 1226/1227 `.aot` markers -> `.build` { "aot": true }.
- lock fixture 1638-platform-target-host (`.build` { "target": "macos" }).

Test-infra only; no compiler code. zig build test green (646 corpus, 444 unit).
2026-06-15 17:37:35 +03:00

10 lines
447 B
Plaintext

// Phase 0 (ASM stream) test-infra lock: exercises the `<name>.build` JSON
// config + `--target` threading + the host-match EXECUTE path of the corpus
// runner. The companion `.build` pins the HOST target (`{ "target": "macos" }`
// resolves to the host arch+os), so the runner threads `--target` and still
// runs the example natively — its stdout is asserted as usual.
#import "modules/std.sx";
main :: () {
print("target-host ok\n");
}