about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-01 19:38:21 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-01 19:38:21 +0100
commit324e63de289e249481445a399fcbcad62b7ab71d (patch)
tree0806d9a656b38ad097fdeb0a9c4163ef13583603
parent8b9c2135d06ee0255d24b18efba8ef9cf92fb67f (diff)
downloadrust-324e63de289e249481445a399fcbcad62b7ab71d.tar.gz
rust-324e63de289e249481445a399fcbcad62b7ab71d.zip
Ensure that sysroot build works with CARGO_TARGET_DIR set
-rwxr-xr-xbuild_sysroot/build_sysroot.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh
index 04c82ca2a51..2b2208fc8e5 100755
--- a/build_sysroot/build_sysroot.sh
+++ b/build_sysroot/build_sysroot.sh
@@ -9,6 +9,9 @@ pushd ../ >/dev/null
 source ./scripts/config.sh
 popd >/dev/null
 
+# We expect the target dir in the default location. Guard against the user changing it.
+export CARGO_TARGET_DIR=target
+
 # Cleanup for previous run
 #     v Clean target dir except for build scripts and incremental cache
 rm -r target/*/{debug,release}/{build,deps,examples,libsysroot*,native} 2>/dev/null || true