ReviewOS

home-lang/home

feat(codegen): `--target=<triple>` for regular (non-kernel) native builds

#795
Open chris opened this 8 days ago ·
8 days ago

Problem

The backend and syscall numbers come from the compiler's own host, so a Home program cannot be cross-compiled; --target is only honored together with --kernel. packages/build/src/cross_compilation.zig exists but nothing references it.

Evidence (origin/main @ d4b219507)

Scope

  • Thread a target (arch + OS + ABI) through native codegen instead of builtin.target.
  • Select the object format, syscall table and calling convention per target.

Acceptance criteria

  • On a macOS host, home build --target=x86_64-linux produces a binary that runs in a Linux container, and vice versa.

Depends on: #796 Related: #15, #583, #5 Part of #814.

Sign in to comment on this issue.