diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-09-22 19:02:30 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-09-23 11:20:56 +0000 |
| commit | 9456ff13c967405bda0615764d217864a27d9b23 (patch) | |
| tree | b71316412ebd51bc5d11f7c196accce81373b77c | |
| parent | b40fe1ee2826a52b2f21c31c43d06caea40885c8 (diff) | |
| download | rust-9456ff13c967405bda0615764d217864a27d9b23.tar.gz rust-9456ff13c967405bda0615764d217864a27d9b23.zip | |
Revert change to apply_patches to fix panic
| -rw-r--r-- | compiler/rustc_codegen_cranelift/build_system/prepare.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/build_system/prepare.rs b/compiler/rustc_codegen_cranelift/build_system/prepare.rs index b9cfcd99a77..30bd7ae26a1 100644 --- a/compiler/rustc_codegen_cranelift/build_system/prepare.rs +++ b/compiler/rustc_codegen_cranelift/build_system/prepare.rs @@ -203,7 +203,12 @@ pub(crate) fn apply_patches(dirs: &Dirs, crate_name: &str, source_dir: &Path, ta eprintln!("[COPY] {crate_name} source"); ensure_empty_dir(target_dir); - 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); |
