rust: Pass lld flags from cc to rust linker args.
Rust is not passing the sysroot flag to Clang when invoking it as the linker. This means files from the host may leak in, and host targets may fail if sysroot files are not available from the host. This patch prepends the lld flags from cc into rust linkargs. This pulls in the sysroots flag, and also ensures that we remain in sync with linkage flags used in cc. The '-Wl,--no-undefined-version' from cc is overridden to avoid missing version assignment errors for rust's generated alloc functions. Bug: 167690054 Test: cd external/rust; mma Test: strace -f -e %file <host libstd.dylib.so build command> pulls from correct sysroots. Change-Id: Ic40597f546f3b112012155614056afed487c6ca1
Loading
Please register or sign in to comment