diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index e9cc7662e6397..007ca9f7f5a92 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -197,7 +197,7 @@ fn copy_self_contained_objects( t!(fs::create_dir_all(&libdir_self_contained)); let mut target_deps = vec![]; - // Copies the CRT objects. + // Copies the libc and CRT objects. // // rustc historically provides a more self-contained installation for musl targets // not requiring the presence of a native musl toolchain. For example, it can fall back @@ -208,7 +208,7 @@ fn copy_self_contained_objects( let srcdir = builder.musl_libdir(target).unwrap_or_else(|| { panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple) }); - for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { + for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] { copy_and_stamp( builder, &libdir_self_contained, @@ -235,7 +235,7 @@ fn copy_self_contained_objects( panic!("Target {:?} does not have a \"wasi-root\" key", target.triple) }) .join("lib/wasm32-wasi"); - for &obj in &["crt1-command.o", "crt1-reactor.o"] { + for &obj in &["libc.a", "crt1-command.o", "crt1-reactor.o"] { copy_and_stamp( builder, &libdir_self_contained,