diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-11-12 16:37:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-12 16:37:40 +0100 |
| commit | 0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81 (patch) | |
| tree | e11a7bb670006b30e1e26791e19bfc66d5a42968 | |
| parent | 6eaa5020498edb4cfe779f286c4b34263546473e (diff) | |
| parent | 7ab499fe493c7e242bce5df6764a9208c88e17da (diff) | |
| download | rust-0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81.tar.gz rust-0a4f37c1faa0deca1c35bf276f0b7d9bfa811d81.zip | |
Merge pull request #1111 from jakobhellermann/hardlinks-instead-of-copy
use hardlinks instead of copying files
| -rwxr-xr-x | build.sh | 6 | ||||
| -rwxr-xr-x | build_sysroot/build_sysroot.sh | 2 |
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} |
