We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15c141c commit 1757a87Copy full SHA for 1757a87
src/bootstrap/compile.rs
@@ -210,7 +210,10 @@ impl Step for StdLink {
210
211
/// Copies the crt(1,i,n).o startup objects
212
///
213
-/// Only required for musl targets that statically link to libc
+/// Since musl supports fully static linking, we can cross link for it even
214
+/// with a glibc-targeting toolchain, given we have the appropriate startup
215
+/// files. As those shipped with glibc won't work, copy the ones provided by
216
+/// musl so we have them on linux-gnu hosts.
217
fn copy_musl_third_party_objects(build: &Build, target: Interned<String>, into: &Path) {
218
for &obj in &["crt1.o", "crti.o", "crtn.o"] {
219
copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj));
0 commit comments