Skip to content

Commit 0a4f37c

Browse files
authored
Merge pull request #1111 from jakobhellermann/hardlinks-instead-of-copy
use hardlinks instead of copying files
2 parents 6eaa502 + 7ab499f commit 0a4f37c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ fi
3737
rm -rf "$target_dir"
3838
mkdir "$target_dir"
3939
mkdir "$target_dir"/bin "$target_dir"/lib
40-
cp -a target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
41-
cp -a target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
42-
cp -a rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"
40+
ln target/$CHANNEL/cg_clif{,_build_sysroot} "$target_dir"/bin
41+
ln target/$CHANNEL/*rustc_codegen_cranelift* "$target_dir"/lib
42+
ln rust-toolchain scripts/config.sh scripts/cargo.sh "$target_dir"
4343

4444
if [[ "$build_sysroot" == "1" ]]; then
4545
echo "[BUILD] sysroot"

build_sysroot/build_sysroot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ fi
3636

3737
# Copy files to sysroot
3838
mkdir -p "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
39-
cp -a "target/$TARGET_TRIPLE/$sysroot_channel/deps/"* "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
39+
ln "target/$TARGET_TRIPLE/$sysroot_channel/deps/"* "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"
4040
rm "$dir/lib/rustlib/$TARGET_TRIPLE/lib/"*.{rmeta,d}

0 commit comments

Comments
 (0)