summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xTestRustcBootstrap.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/TestRustcBootstrap.sh b/TestRustcBootstrap.sh
index 0999cc10..51a5218c 100755
--- a/TestRustcBootstrap.sh
+++ b/TestRustcBootstrap.sh
@@ -11,6 +11,9 @@ export MAKEFLAGS
echo "=== Building stage0 rustc (with libstd)"
make -C run_rustc
+#
+# Build rustc using entirely mrustc-built tools
+#
echo "--- Working in directory ${WORKDIR}"
echo "=== Building rustc bootstrap mrustc stage0"
mkdir -p ${WORKDIR}mrustc/
@@ -39,15 +42,25 @@ echo "--- Running x.py, see ${WORKDIR}mrustc.log for progress"
(cd ${WORKDIR} && mv mrustc build)
(cd ${WORKDIR}build/rustc-1.19.0-src/ && ./x.py build) > ${WORKDIR}mrustc.log 2>&1
(cd ${WORKDIR} && mv build mrustc)
+rm -rf ${WORKDIR}mrustc-output
cp -r ${WORKDIR}mrustc/rustc-1.19.0-src/build/x86_64-unknown-linux-gnu/stage2 ${WORKDIR}mrustc-output
tar -czvf ${WORKDIR}mrustc.tar.gz -C ${WORKDIR} mrustc-output
+#
+# Build rustc by downloading the previous version of rustc
+# > Note: This uses the locally-built cargo (due to subtle version differences)
+#
echo "=== Building rustc bootstrap downloaded stage0"
mkdir -p ${WORKDIR}official/
tar -xf rustc-1.19.0-src.tar.gz -C ${WORKDIR}official/
+cat - > ${WORKDIR}official/rustc-1.19.0-src/config.toml <<EOF
+[build]
+cargo = "${PREFIX}bin/cargo"
+EOF
echo "--- Running x.py, see ${WORKDIR}official.log for progress"
(cd ${WORKDIR} && mv official build)
(cd ${WORKDIR}build/rustc-1.19.0-src/ && ./x.py build) > ${WORKDIR}official.log 2>&1
(cd ${WORKDIR} && mv build official)
+rm -rf ${WORKDIR}official-output
cp -r ${WORKDIR}official/rustc-1.19.0-src/build/x86_64-unknown-linux-gnu/stage2 ${WORKDIR}official-output
tar -czvf ${WORKDIR}official.tar.gz -C ${WORKDIR} official-output