Browse Source

Update rust bootstrap to 1.47.0

master
mid-kid 4 years ago
parent
commit
1d38bbdb43
  1. 20
      rust/build.sh
  2. 4
      rust/build_mrustc.sh
  3. 12
      rust/build_rust.sh
  4. 4
      rust/download.sh
  5. 7
      rust/download.sha256
  6. 3
      rust/llvm_versions.txt

20
rust/build.sh

@ -1,23 +1,35 @@
#!/bin/sh
set -eu
export MAKEFLAGS="-j$(nproc)"
export MAKEFLAGS="-j${NPROC:-$(nproc)}"
export CFLAGS='-w'
export CXXFLAGS="$CFLAGS"
version_mrustc=0.9
version_mrustc_rust=1.29.0
versions_llvm='7.1.0'
versions_rustc='1.30.1 1.31.1 1.32.0 1.33.0 1.34.2 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.1'
versions_llvm='7.1.0 10.0.1'
versions_rustc='1.30.1 1.31.1 1.32.0 1.33.0 1.34.2 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.1 1.42.0 1.43.1 1.44.1 1.45.2 1.46.0 1.47.0'
[ ! -d build/install-rustc-$version_mrustc_rust ] && ./build_mrustc.sh
# Save a ton of space by deleting the source
rm -rf build/mrustc-$version_mrustc
for version in $versions_llvm; do
[ ! -d build/install-llvm-$version ] && ./build_llvm.sh $version
# Save a ton of space by deleting the source
rm -rf build/llvm-$version.src
done
last_version=$version_mrustc_rust
for version in $versions_rustc; do
version_llvm=7.1.0
case "$version" in
1.3[0-9].*|1.4[0-3].*)
version_llvm=7.1.0 ;;
1.4[4-7].*|*)
version_llvm=10.0.1 ;;
esac
[ ! -e build/install-rustc-$version/bin/cargo ] && ./build_rust.sh $last_version $version $version_llvm
# Save a ton of space by deleting the source
rm -rf build/rustc-$version-src
last_version=$version
done

4
rust/build_mrustc.sh

@ -26,7 +26,6 @@ sed -i -e 's/CMAKE_BUILD_TYPE=RelWithDebInfo/CMAKE_BUILD_TYPE=Release/' \
minicargo.mk
sed -i -e 's/ -g\>//' Makefile tools/common/Makefile tools/minicargo/Makefile
sed -i -e '/args.push_back("-g");/d' tools/minicargo/build.cpp
#cat "$dir_patches/rustc-1.19.0-new-openssl.patch" >> rustc-$version_mrustc_rust-src.patch
cp "$dir_download/rustc-$version_mrustc_rust-src.tar.xz" .
make RUSTC_VERSION=$version_mrustc_rust RUSTC_SRC_TARBALL="rustc-$version_mrustc_rust-src.tar.xz" RUSTCSRC
@ -40,6 +39,3 @@ make
make -f minicargo.mk rustc-$version_mrustc_rust-src/build/bin/llvm-config
make -j1 -f minicargo.mk output/rustc output/cargo
make -j1 PREFIX="$dir_install/" -C run_rustc
#mkdir -p "$dir_install"
#cp -aT run_rustc/output/prefix "$dir_install"

12
rust/build_rust.sh

@ -9,9 +9,6 @@ dir_download="$PWD/download"
mkdir -p build; cd build
dir_install="$PWD/install-rustc-$version_rustc"
#export LD_LIBRARY_PATH="$dir_bootstrap/lib/rustlib/x86_64-unknown-linux-gnu/lib:${LD_LIBRARY_PATH:-}"
# TODO: Test this for all versions
# Prepare source
tar xf "$dir_download/rustc-$version_rustc-src.tar.xz"
cd "rustc-$version_rustc-src"
@ -24,6 +21,13 @@ cd "rustc-$version_rustc-src"
--llvm-root="$PWD/../install-llvm-$version_llvm" \
--enable-vendor
case "$version_rustc"
1.3[0-9].*|1.4[0-6].*)
paths='src/libstd src/librustc cargo' ;;
1.47.*|*)
paths='library/std src/librustc cargo' ;;
esac
# Build and install
mkdir -p "$dir_install"
./x.py install --stage 2 src/libstd src/librustc cargo
./x.py install $MAKEFLAGS --stage 2 $paths

4
rust/download.sh

@ -3,8 +3,8 @@ set -eu
version_mrustc=0.9 # https://github.com/thepowersgang/mrustc/releases/
version_mrustc_rust=1.29.0 # Depends on mrustc
versions_llvm='7.1.0' # https://github.com/llvm/llvm-project/releases
versions_rustc='1.30.1 1.31.1 1.32.0 1.33.0 1.34.2 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.1' # https://github.com/rust-lang/rust/blob/master/RELEASES.md
versions_llvm='7.1.0 10.0.1' # https://github.com/llvm/llvm-project/releases
versions_rustc='1.30.1 1.31.1 1.32.0 1.33.0 1.34.2 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.1 1.42.0 1.43.1 1.44.1 1.45.2 1.46.0 1.47.0' # https://github.com/rust-lang/rust/blob/master/RELEASES.md
mkdir -p download
cd download

7
rust/download.sha256

@ -1,3 +1,4 @@
c5d8e30b57cbded7128d78e5e8dad811bff97a8d471896812f57fa99ee82cdf3 llvm-10.0.1.src.tar.xz
1bcc9b285074ded87b88faaedddb88e6b5d6c331dfcfb57d7f3393dd622b3764 llvm-7.1.0.src.tar.xz
381ded90498a04a667ab67a33c1bf7ff1269026bd45a6bde9bac8bf694929de6 mrustc-0.9.tar.gz
3943da98fb478a336ede7404e42ff76ef6ba4fc2b82012cfccd6b9fc4bd2c191 rustc-1.29.0-src.tar.xz
@ -13,3 +14,9 @@ f51645b9f787af4a5d94db17f6af39db0c55980ed24fe366cad55b57900f8f2d rustc-1.36.0-s
4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29 rustc-1.39.0-src.tar.xz
6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace rustc-1.40.0-src.tar.xz
ebac9861b43c7207af36e24402dfdc5463a4df4bdb015ccb2b165251c0fdcf7c rustc-1.41.1-src.tar.xz
aa5b4c0f2bac33cc26a11523fce9b0f120d2eff510ed148ae7c586501481ed04 rustc-1.42.0-src.tar.xz
eb0a103c67c4565403d9e6f84a1c708982a5e9e5b3c0d831e4d6f6451795d106 rustc-1.43.1-src.tar.xz
e0386295dd5f2c7842835a509e4c57989eec6c29f989a1c85478b0e06f9d38ea rustc-1.44.1-src.tar.xz
f8412adac2f5d974b2f06c5bd4be7361084d18a678d098bf05de5ccfa57b74a9 rustc-1.45.2-src.tar.xz
865dae1290a205f16ded8818c6a0254cc32862985fc250a602a70285b7d92b82 rustc-1.46.0-src.tar.xz
ec2c81d2d34890486094a6407589be96161e4e301c238332d32c6dbae4f38ea2 rustc-1.47.0-src.tar.xz

3
rust/llvm_versions.txt

@ -11,3 +11,6 @@ Needed versions:
1.39: >=6
1.40: >=6
1.41: >=7
1.42: >=7
1.43: >=7
1.44: >=8 <=10

Loading…
Cancel
Save