Skip to content

Commit 7734cb8

Browse files
committed
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 rust-lang/libc#2272, which in turn fix: - rust-lang/wg-cargo-std-aware#66 - #89626
2 parents 473eaa4 + b23c1c5 commit 7734cb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/bootstrap/compile.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fn copy_self_contained_objects(
197197
t!(fs::create_dir_all(&libdir_self_contained));
198198
let mut target_deps = vec![];
199199

200-
// Copies the CRT objects.
200+
// Copies the libc and CRT objects.
201201
//
202202
// rustc historically provides a more self-contained installation for musl targets
203203
// not requiring the presence of a native musl toolchain. For example, it can fall back
@@ -208,7 +208,7 @@ fn copy_self_contained_objects(
208208
let srcdir = builder.musl_libdir(target).unwrap_or_else(|| {
209209
panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
210210
});
211-
for &obj in &["crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
211+
for &obj in &["libc.a", "crt1.o", "Scrt1.o", "rcrt1.o", "crti.o", "crtn.o"] {
212212
copy_and_stamp(
213213
builder,
214214
&libdir_self_contained,
@@ -235,7 +235,7 @@ fn copy_self_contained_objects(
235235
panic!("Target {:?} does not have a \"wasi-root\" key", target.triple)
236236
})
237237
.join("lib/wasm32-wasi");
238-
for &obj in &["crt1-command.o", "crt1-reactor.o"] {
238+
for &obj in &["libc.a", "crt1-command.o", "crt1-reactor.o"] {
239239
copy_and_stamp(
240240
builder,
241241
&libdir_self_contained,

0 commit comments

Comments
 (0)