about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-12 16:37:40 +0100
committerGitHub <noreply@github.com>2020-11-12 16:37:40 +0100
commit0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81 (patch)
treee11a7bb670006b30e1e26791e19bfc66d5a42968
parent6eaa5020498edb4cfe779f286c4b34263546473e (diff)
parent7ab499fe493c7e242bce5df6764a9208c88e17da (diff)
downloadrust-0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81.tar.gz
rust-0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81.zip
Merge pull request #1111 from jakobhellermann/hardlinks-instead-of-copy
use hardlinks instead of copying files
-rwxr-xr-xbuild.sh6
-rwxr-xr-xbuild_sysroot/build_sysroot.sh2
2 files changed, 4 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 3d77d1d8729..420ec825f92 100755
--- a/build.sh
+++ b/build.sh
@@ -37,9 +37,9 @@ fi
 rm -rf "$target_dir"
 mkdir "$target_dir"
 mkdir "$target_dir"/bin "$target_dir"/lib
-cp -a target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
-cp -a target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
-cp -a rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"
+ln target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
+ln target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
+ln rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"
 
 if [[ "$build_sysroot" == "1" ]]; then
     echo "[BUILD] sysroot"
diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh
index 0223cf74e81..d7a72df2eb2 100755
--- a/build_sysroot/build_sysroot.sh
+++ b/build_sysroot/build_sysroot.sh
@@ -36,5 +36,5 @@ fi
 
 # Copy files to sysroot
 mkdir -p "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
-cp -a "target/$TARGET_TRIPLE/$sysroot_channel/deps/"* "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
+ln "target/$TARGET_TRIPLE/$sysroot_channel/deps/"* "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
 rm "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"*.{rmeta,d}