This change adds the environment variable LINKER to pass the path
of the linker used by cargo to the build script. This ammends the
variable RUSTC (the rustc binary used) to give the build script
full knowledge of its environment.
A specific usage example would be automatically generating bindings
to system headers in cross compilation, e.g. by locating jni.h for
android targets.
.env("HOST", &cx.build_config.host_triple())
.env("RUSTC", &cx.build_config.rustc.path)
.env("RUSTDOC", &*cx.config.rustdoc()?)
+ .env("LINKER", &cx.build_config.target.linker.as_ref().unwrap_or(&PathBuf::new()))
.inherit_jobserver(&cx.jobserver);
if let Some(links) = unit.pkg.manifest().links() {