forked from kiss-community/repo
rust: bootstrap with system compiler, et al if possible
This commit is contained in:
parent
b9671a4da5
commit
1094aa35d1
@ -6,17 +6,6 @@ patch -p1 < fix-curl.patch
|
|||||||
# change them to relative paths ($PWD/... ./...).
|
# change them to relative paths ($PWD/... ./...).
|
||||||
export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$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.
|
# Set shared linking as the default.
|
||||||
sed 's/\(crt_static_default = \)true/\1false/' \
|
sed 's/\(crt_static_default = \)true/\1false/' \
|
||||||
compiler/rustc_target/src/spec/linux_musl_base.rs > _
|
compiler/rustc_target/src/spec/linux_musl_base.rs > _
|
||||||
@ -48,6 +37,31 @@ tools = [ "cargo", "rustfmt" ]
|
|||||||
sanitizers = false
|
sanitizers = false
|
||||||
profiler = false
|
profiler = false
|
||||||
full-bootstrap = 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 <<EOF
|
||||||
|
cargo = "/usr/bin/cargo"
|
||||||
|
rustc = "/usr/bin/rustc"
|
||||||
|
rustfmt = "/usr/bin/rustfmt"
|
||||||
|
EOF
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
# This 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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
cat >> config.toml <<EOF
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
prefix = "/usr"
|
prefix = "/usr"
|
||||||
|
Loading…
Reference in New Issue
Block a user