Skip to content

Commit 1757a87

Browse files
committed
Improve explanation of musl_root
1 parent 15c141c commit 1757a87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/compile.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,10 @@ impl Step for StdLink {
210210

211211
/// Copies the crt(1,i,n).o startup objects
212212
///
213-
/// Only required for musl targets that statically link to libc
213+
/// 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.
214217
fn copy_musl_third_party_objects(build: &Build, target: Interned<String>, into: &Path) {
215218
for &obj in &["crt1.o", "crti.o", "crtn.o"] {
216219
copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj));

0 commit comments

Comments
 (0)