Auto merge of #90527 - 12101111:libc_a, r=petrochenkov
Provide standalone libc.a in self-contained for musl and wasi This is a prerequisites of https://github.com/rust-lang/libc/pull/2272, which in turn fix: - https://github.com/rust-lang/wg-cargo-std-aware/issues/66 - https://github.com/rust-lang/rust/issues/89626
This commit is contained in:
commit
7734cb8078
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue