summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-12-02 07:25:37 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-12-02 07:25:37 +0800
commitb590a2adb49ba146aa2d866af4e47c7d9427acf0 (patch)
treee142127a642f9dcfe740b456843ec3f9773332d6
parent7bdf012eb9626ce3a226b00265bd7845a01581f2 (diff)
downloadmrust-b590a2adb49ba146aa2d866af4e47c7d9427acf0.tar.gz
TestRustcBootstrap - Appears to work (makes same filenames anyway)
-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