Skip to content

Commit

Permalink
Auto merge of rust-lang#90527 - 12101111:libc_a, r=petrochenkov
Browse files Browse the repository at this point in the history
Provide standalone libc.a in self-contained for musl and wasi

This is a prerequisites of rust-lang/libc#2272, which in turn fix:

- rust-lang/wg-cargo-std-aware#66
- rust-lang#89626
  • Loading branch information
bors committed Nov 3, 2021
2 parents 473eaa4 + b23c1c5 commit 7734cb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 7734cb8

Please sign in to comment.