Skip to content

Commit

Permalink
Merge pull request #20 from RalfJung/no-more-copy
Browse files Browse the repository at this point in the history
copying extra files should not be needed any more
  • Loading branch information
RalfJung authored May 26, 2024
2 parents 5d54a58 + 6401873 commit 10480be
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
rust:
- nightly
# Check a ~3 months old nightly as "oldest supported version"
- nightly-2023-10-01
- nightly-2024-01-01
# We want to run all of the above on Linux, macOS, windows-msvc, windows-gnu.
# The semantics of combining `include` with other things in GHA are very strange
# so this seems like the best way of doing that.
Expand Down
22 changes: 0 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,28 +553,6 @@ panic = 'unwind'
fs::copy(&entry, staging_lib_dir.join(entry.file_name().unwrap()))
.context("failed to copy cargo out file")?;
}
// If we are doing a full build, copy any other files and directories that need copying from
// the original sysroot.
if matches!(self.mode, BuildMode::Build) {
let extra_copy_paths = &["bin"];
let dist_sysroot_target_dir = dist_sysroot()?
.join("lib")
.join("rustlib")
.join(&target_name);
for path in extra_copy_paths {
let src = dist_sysroot_target_dir.join(path);
if src.exists() {
let dst = staging_dir.path().join(path);
symlink_or_copy_dir(&src, &dst).with_context(|| {
format!(
"failed to symlink/copy `{src}` to `{dst}`",
src = src.display(),
dst = dst.display(),
)
})?;
}
}
}

// Write the hash file (into the staging dir).
fs::write(
Expand Down

0 comments on commit 10480be

Please sign in to comment.