Skip to content

Commit 9287abf

Browse files
committed
Detect bootstrap version to link correct paths
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.
1 parent 232dad9 commit 9287abf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ansible/roles/dev-desktop/files/scripts/link_rust.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ echo 'Run "x.py build --stage 1 library/std" to create a real sysroot you can us
1616
EOF
1717
)
1818

19-
stages=(stage1 stage2)
20-
2119
for D in rust*; do
2220
if [ -d "$D" ]; then
2321
pushd "$D"
2422

23+
bootstrap_version=$(grep 'pub const VERSION' src/bootstrap/lib.rs | grep -o '[0-9]*')
24+
25+
if [ "$bootstrap_version" -eq 3 ]; then
26+
stages=(stage1-sysroot stage2-sysroot)
27+
else
28+
stages=(stage1 stage2)
29+
fi
30+
2531
for stage in "${stages[@]}"; do
2632
directory="build/${target}/${stage}"
2733

0 commit comments

Comments
 (0)