diff --git a/scripts/rust-frontier/swap-rust-into-toolchain.sh b/scripts/rust-frontier/swap-rust-into-toolchain.sh index d09a79ad..b76420b8 100755 --- a/scripts/rust-frontier/swap-rust-into-toolchain.sh +++ b/scripts/rust-frontier/swap-rust-into-toolchain.sh @@ -51,7 +51,18 @@ if [ "$RESTORE" = 1 ]; then echo " (sin backup de usr/bin/$b — ¿ya restaurado?)" fi done - echo " (los .so y el rustlib x86_64-unknown-linux-musl añadidos quedan; son inertes — el rustc de Alpine no los usa)" + # Quitar también lo AÑADIDO por el swap: el librustc_driver de hammer (hash propio, distinto del + # de Alpine) y el sysroot del triple x86_64-unknown-linux-musl (un devfs Alpine prístino NO los + # tiene). Inertes para el rustc de Alpine, pero dejarlos es ~350 MB de cruft y deja el toolchain + # no-prístino; lo limpiamos para que --restore sea reversibilidad total. + rm -rf "$TOOLCHAIN/usr/lib/rustlib/x86_64-unknown-linux-musl" + # Sólo los librustc_driver que NO son de Alpine (Alpine deja exactamente uno; el swap añadió otro). + if [ -d "$PREFIX/lib" ]; then + for so in "$PREFIX"/lib/librustc_driver-*.so; do + [ -e "$so" ] && rm -f "$TOOLCHAIN/usr/lib/$(basename "$so")" + done + fi + echo " limpiado usr/lib/rustlib/x86_64-unknown-linux-musl + librustc_driver de hammer" exit 0 fi diff --git a/scripts/selfhost-verify.sh b/scripts/selfhost-verify.sh index bcce2f99..688de86c 100755 --- a/scripts/selfhost-verify.sh +++ b/scripts/selfhost-verify.sh @@ -90,9 +90,10 @@ if [[ "${SWAP_RUST:-0}" == 1 ]]; then # para forzar el rebuild de los 4/4 con hammer-rust; así el of_tree refleja el compilador nuevo. STORE="${RUST_STORE:-store-rust}" say "SWAP_RUST: store dedicado $STORE (el ./store baseline no se toca; fuerza rebuild con hammer-rust)" - # Con hammer-rust el REF NO es el 9adefb82 de Alpine; comparamos contra RUST_EXPECT_REF (si se - # conoce de una corrida previa), no contra el baseline Alpine. - EXPECT_REF="${RUST_EXPECT_REF:-}" + # Con hammer-rust el REF NO es el 9adefb82 de Alpine; comparamos contra RUST_EXPECT_REF, el + # of_tree(stage1) auto-consistente de hammer-rust 1.91.1 (reproducido 2× en host, 2026-06-17, + # store-rust y store-rust2). Override con RUST_EXPECT_REF= para re-anclar. + EXPECT_REF="${RUST_EXPECT_REF:-b3:7fa6cb4e70a934d72206cf3d95cf46a13f0a6464ec73855b98d547195f4ed047}" fi # 1) Store baseline: stage1 (idempotente; rebuildea lo que falte con -mcpu=baseline ya en fuente).