Files
hammer/scripts/rust-frontier/run-runrustc.sh
T
sergioandClaude Opus 4.8 bf3f1166ec selfhost-verify: artefactos del frente rust (parche run_rustc + runners stage0-musl)
Rastrea las correcciones del frente rust que vivían en .scratch/ (gitignored):

- run_rustc.patch (vs mrustc be69c74): minicargo/hello con --target musl;
  RUSTFLAGS + sitios de link con link-self-contained=no (CRT vía gcc Alpine,
  link dinámico contra musl); proxy host-units con crt-static off (sin inject
  de --target, host==target==musl con el stage0 musl-host).
- build-stage0-musl.sh: rebuild del stage0 rustc+cargo con host triple musl
  (CFG_COMPILER_HOST_TRIPLE vía RUSTC_TARGET, --target vía MRUSTC_TARGET),
  reusa LLVM + bin/mrustc. Gotcha OUTDIR_SUF documentado.
- run-runrustc.sh: corre targets de run_rustc en el sandbox devfs apuntando
  al stage0 musl-host.
- README: diagnóstico de los 3 snags acoplados (std-gnu mmap64/open64,
  CRT self-contained ausente, host-triple gnu + proc-macros) y el workflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 21:48:37 -04:00

25 lines
777 B
Bash
Executable File

#!/bin/sh
# Run a run_rustc make target inside the Alpine devfs sandbox (musl, 256-TLS loader, gcc).
# Usage: run-runrustc.sh <make-target> [extra make args...]
set -eu
ROOT=/home/sergio/hammer
DEVFS=$ROOT/.dev-fs/alpine
MRUSTC=$ROOT/.scratch/mrustc
TARGET=${1:?make target required}
shift || true
exec bwrap \
--bind "$DEVFS" / \
--bind "$MRUSTC" /mrustc \
--dev /dev --proc /proc \
--tmpfs /tmp --tmpfs /run \
--setenv PATH /usr/bin:/bin:/usr/sbin:/sbin \
--setenv HOME /root \
--setenv TMPDIR /tmp \
--setenv MRUSTC_TARGET_VER 1.90 \
--setenv CC gcc --setenv CXX g++ \
--chdir /mrustc/run_rustc \
make RUSTC_VERSION=1.90.0 OUTDIR_SUF=-1.90.0-x86_64-unknown-linux-musl \
RUSTC_TARGET=x86_64-unknown-linux-musl PARLEVEL=8 \
"$TARGET" "$@"