Skip to content

Commit

Permalink
Detect bootstrap version to link correct paths
Browse files Browse the repository at this point in the history
The directory names for the stages are changing in version 3 of the
boostrapping (see rust-lang/rust#103286). We are
checking the version now to create the correct dummy directories.
  • Loading branch information
jdno committed Nov 2, 2022
1 parent 232dad9 commit 9287abf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ansible/roles/dev-desktop/files/scripts/link_rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ echo 'Run "x.py build --stage 1 library/std" to create a real sysroot you can us
EOF
)

stages=(stage1 stage2)

for D in rust*; do
if [ -d "$D" ]; then
pushd "$D"

bootstrap_version=$(grep 'pub const VERSION' src/bootstrap/lib.rs | grep -o '[0-9]*')

if [ "$bootstrap_version" -eq 3 ]; then
stages=(stage1-sysroot stage2-sysroot)
else
stages=(stage1 stage2)
fi

for stage in "${stages[@]}"; do
directory="build/${target}/${stage}"

Expand Down

0 comments on commit 9287abf

Please sign in to comment.