Skip to content

Commit 9456ff1

Browse files
committed
Revert change to apply_patches to fix panic
1 parent b40fe1e commit 9456ff1

File tree

1 file changed

+6
-1
lines changed
  • compiler/rustc_codegen_cranelift/build_system

1 file changed

+6
-1
lines changed

compiler/rustc_codegen_cranelift/build_system/prepare.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ pub(crate) fn apply_patches(dirs: &Dirs, crate_name: &str, source_dir: &Path, ta
203203
eprintln!("[COPY] {crate_name} source");
204204

205205
ensure_empty_dir(target_dir);
206-
copy_dir_recursively(source_dir, target_dir);
206+
if crate_name == "stdlib" {
207+
fs::create_dir(target_dir.join("library")).unwrap();
208+
copy_dir_recursively(&source_dir.join("library"), &target_dir.join("library"));
209+
} else {
210+
copy_dir_recursively(source_dir, target_dir);
211+
}
207212

208213
init_git_repo(target_dir);
209214

0 commit comments

Comments
 (0)