File tree Expand file tree Collapse file tree 1 file changed +23
-8
lines changed
ansible/roles/dev-desktop/files/scripts Expand file tree Collapse file tree 1 file changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,32 @@ IFS=$'\n\t'
88# Discover target triple (e.g. "aarch64-unknown-linux-gnu")
99target=" $( rustc -vV | awk ' /host/ { print $2 }' ) "
1010
11+ rustc_dummy=$(
12+ cat << EOF
13+ #!/usr/bin/env bash
14+ echo "This is a dummy file to trick rustup into thinking this is a sysroot"
15+ echo 'Run "x.py build --stage 1 library/std" to create a real sysroot you can use with rustup'
16+ EOF
17+ )
18+
19+ stages=(stage1 stage2)
20+
1121for D in rust* ; do
12- if [ -d " ${D} " ]; then
13- pushd " ${D} "
22+ if [ -d " $D " ]; then
23+ pushd " $D "
24+
25+ for stage in " ${stages[@]} " ; do
26+ directory=" build/${target} /${stage} "
1427
15- if [[ -d " $D /build/$target /stage1" ]]; then
16- rustup toolchain link " $D " _stage1 " $D /build/$target /stage1"
17- fi
28+ if [ ! -d " $directory " ]; then
29+ mkdir -p " ${directory} /lib"
30+ mkdir -p " ${directory} /bin"
31+ echo " $rustc_dummy " >> " ${directory} /bin/rustc"
32+ chmod +x " ${directory} /bin/rustc"
33+ fi
1834
19- if [[ -d " $D /build/$target /stage2" ]]; then
20- rustup toolchain link " $D " _stage2 " $D /build/$target /stage2"
21- fi
35+ rustup toolchain link " ${D} _${stage} " " $directory "
36+ done
2237
2338 popd
2439 fi
You can’t perform that action at this time.
0 commit comments