Ambos hops del climb construidos con el bootstrap real (x.py) en el sandbox devfs,
reusando LLVM 20.1.8 externo en todo (gate >=19) — sin rebuild de LLVM:
mrustc → rustc 1.90.0 → rustc 1.91.0 → rustc 1.91.1
- hop 1 (1.90.0→1.91.0): bootstrap.toml, stage0 = prefix run_rustc musl-host
1.90.0. stage-2 + install → rust-1.91.0-prefix relocatable (rpath).
- hop 2 (1.91.0→1.91.1): bootstrap-1.91.1.toml, stage0 rustc = el 1.91.0 instalado
(bind ro /stage0 vía STAGE0), stage0 cargo = el 1.90.0 (pasa el check minor-1).
extended+cargo. FIX cargo-native-static=true → feature all-static (openssl/curl/
libgit2/libz vendored desde fuente vía gcc), el devfs hermético no tiene OpenSSL.
- run-xpy.sh: añade bind ro opcional /stage0 (env STAGE0) para el stage0 del hop.
VERIFICADO: rust-1.91.1-prefix/bin/{rustc,cargo} corren standalone (solo prefix
montado, rpath). rustc 1.91.1 (ed61e7d7e) host x86_64-unknown-linux-musl LLVM
20.1.8; cargo 1.91.1. Smoke-test compila+corre. Es la versión EXACTA de Alpine,
auto-alojada desde la cadena mrustc. Cada hop ~45min (LLVM reusado).
NEXT: swap rust 1.91.1 en /toolchain + criterio de auto-consistencia (EXPECT_REF).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
# Run rust's x.py inside the Alpine devfs sandbox (musl, 256-TLS loader, gcc),
|
|
# pointed at the mrustc-bootstrapped stage0. Hermetic: vendored deps, external LLVM.
|
|
# Usage: run-xpy.sh <SRCDIR> <PREFIXDIR> -- <x.py args...>
|
|
# SRCDIR : host path to the rust source tree (mounted at /src)
|
|
# PREFIXDIR : host path for the install prefix (mounted at /out)
|
|
set -eu
|
|
ROOT=/home/sergio/hammer
|
|
DEVFS=$ROOT/.dev-fs/alpine
|
|
MRUSTC=$ROOT/.scratch/mrustc
|
|
SRC=${1:?src dir required}; shift
|
|
PREFIX=${1:?prefix dir required}; shift
|
|
[ "${1:-}" = "--" ] && shift
|
|
|
|
# Optional read-only stage0 prefix (a prior hop's installed toolchain), bound at
|
|
# /stage0 when STAGE0 is set in the environment. bootstrap.toml's build.rustc can
|
|
# then reference /stage0/bin/rustc for a climb hop.
|
|
STAGE0_BIND=""
|
|
[ -n "${STAGE0:-}" ] && STAGE0_BIND="--ro-bind $STAGE0 /stage0"
|
|
|
|
exec bwrap \
|
|
--bind "$DEVFS" / \
|
|
--bind "$MRUSTC" /mrustc \
|
|
--bind "$SRC" /src \
|
|
--bind "$PREFIX" /out \
|
|
$STAGE0_BIND \
|
|
--dev /dev --proc /proc \
|
|
--tmpfs /tmp --tmpfs /run \
|
|
--setenv PATH /usr/bin:/bin:/usr/sbin:/sbin \
|
|
--setenv HOME /root \
|
|
--setenv TMPDIR /tmp \
|
|
--setenv CC gcc --setenv CXX g++ \
|
|
--setenv RUST_BACKTRACE 1 \
|
|
--chdir /src \
|
|
python3 x.py "$@"
|