Make rust builds hermetic

Rust builds were picking up the crt objects and system libraries like
libc.so from /usr/lib/x86_64-linux-gnu/Scrt1.o and
/lib/x86_64-linux-gnu/libc.so.6.  Pass --sysroot to the linker to
point it to the glibc prebuilts.

Test: manual
Change-Id: I6540df8aef0e5c2258de77456d18a6052db627d4
This commit is contained in:
Colin Cross
2021-09-10 09:55:54 -07:00
parent a0dc31d4a2
commit 748c8c7e09

View File

@@ -26,6 +26,7 @@ var (
"-B${cc_config.ClangBin}",
"-fuse-ld=lld",
"-Wl,--undefined-version",
"--sysroot ${cc_config.LinuxGccRoot}/sysroot",
}
linuxX86Rustflags = []string{}
linuxX86Linkflags = []string{}