]> git.lizzy.rs Git - rust.git/commitdiff
Improve explanation of musl_root
authorSamuel Holland <samuel@sholland.org>
Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)
committerSamuel Holland <samuel@sholland.org>
Tue, 22 Aug 2017 21:24:29 +0000 (16:24 -0500)
src/bootstrap/compile.rs

index 78bc225447bd0b920e9a7189b51b6314f66b1805..5b03608f6875d333d4eb00c42d5e4a9329f52ebe 100644 (file)
@@ -210,7 +210,10 @@ fn run(self, builder: &Builder) {
 
 /// Copies the crt(1,i,n).o startup objects
 ///
-/// Only required for musl targets that statically link to libc
+/// Since musl supports fully static linking, we can cross link for it even
+/// with a glibc-targeting toolchain, given we have the appropriate startup
+/// files. As those shipped with glibc won't work, copy the ones provided by
+/// musl so we have them on linux-gnu hosts.
 fn copy_musl_third_party_objects(build: &Build, target: Interned<String>, into: &Path) {
     for &obj in &["crt1.o", "crti.o", "crtn.o"] {
         copy(&build.musl_root(target).unwrap().join("lib").join(obj), &into.join(obj));