diff --git a/extra/rust/build b/extra/rust/build index 301dabeb..b5f293be 100755 --- a/extra/rust/build +++ b/extra/rust/build @@ -6,17 +6,6 @@ patch -p1 < fix-curl.patch # change them to relative paths ($PWD/... ./...). export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$PWD=." -# This package mimics the download process of rust's 'x.py' -# bootstrap library to allow for the removal of the internet -# connection requirement per build. -{ - mkdir -p "${cache_dir:=build/cache/2022-05-19}" - - for tarball in *.tar.xz\?no-extract; do - mv -f "$tarball" "$cache_dir/${tarball%%\?no-extract}" - done -} - # Set shared linking as the default. sed 's/\(crt_static_default = \)true/\1false/' \ compiler/rustc_target/src/spec/linux_musl_base.rs > _ @@ -48,6 +37,31 @@ tools = [ "cargo", "rustfmt" ] sanitizers = false profiler = false full-bootstrap = false +EOF + +# If possible, use local rust to bootstrap. +case $(rustc --version 2>/dev/null) in + *1.62*|*1.61*) + cat >> config.toml <> config.toml <