diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-05-29 13:41:55 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-06-13 16:39:59 +0000 |
| commit | d0ea8bbc5e8dcb2018a248ee9d88a02ce2319b3c (patch) | |
| tree | d13f7838904ab765e2b48b7ba475e0cbdb3cb30b | |
| parent | 6b9af8cb36d2bc1ae57768e3c8703093870d919f (diff) | |
| download | rust-d0ea8bbc5e8dcb2018a248ee9d88a02ce2319b3c.tar.gz rust-d0ea8bbc5e8dcb2018a248ee9d88a02ce2319b3c.zip | |
Only copy library dir for stdlib
When building as part of rust, the sysroot source dir is symlinked to the main source dir, which contains the build dir to which we are likely copying.
| -rw-r--r-- | build_system/prepare.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/build_system/prepare.rs b/build_system/prepare.rs index 350c3ad8fdc..748d92614b6 100644 --- a/build_system/prepare.rs +++ b/build_system/prepare.rs @@ -268,7 +268,12 @@ pub(crate) fn apply_patches(dirs: &Dirs, crate_name: &str, source_dir: &Path, ta remove_dir_if_exists(target_dir); fs::create_dir_all(target_dir).unwrap(); - copy_dir_recursively(source_dir, target_dir); + if crate_name == "stdlib" { + fs::create_dir(target_dir.join("library")).unwrap(); + copy_dir_recursively(&source_dir.join("library"), &target_dir.join("library")); + } else { + copy_dir_recursively(source_dir, target_dir); + } init_git_repo(target_dir); |
