Scripts for bootstrapping various programming languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
780 B

#!/bin/sh
set -eu
version_rustc_bootstrap="$1"
version_rustc="$2"
version_llvm="$3"
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"
# Configure source
./configure \
--prefix="$dir_install" \
--sysconfdir="$dir_install/etc" \
--local-rust-root="$PWD/../install-rustc-$version_rustc_bootstrap" \
--llvm-root="$PWD/../install-llvm-$version_llvm" \
--enable-vendor
# Build and install
mkdir -p "$dir_install"
./x.py install --stage 2 src/libstd src/librustc cargo