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.
This commit is contained in:
parent
6b9af8cb36
commit
d0ea8bbc5e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user