bootstrap: only build crt{begin,end}.o when compiling to MUSL · rust-lang/rust@88260f4 (original) (raw)

Original file line number Diff line number Diff line change
@@ -339,7 +339,7 @@ fn copy_self_contained_objects(
339 339 // to using gcc from a glibc-targeting toolchain for linking.
340 340 // To do that we have to distribute musl startup objects as a part of Rust toolchain
341 341 // and link with them manually in the self-contained mode.
342 -if target.contains("musl") && !target.contains("unikraft") {
342 +if target.needs_crt_begin_end() {
343 343 let srcdir = builder.musl_libdir(target).unwrap_or_else(|
344 344 panic!("Target {:?} does not have a \"musl-libdir\" key", target.triple)
345 345 });