Pass linker path to build script
authorHenrik Laxhuber <henrik@laxhuber.com>
Fri, 20 Apr 2018 15:04:14 +0000 (17:04 +0200)
committerHenrik Laxhuber <henrik@laxhuber.com>
Fri, 20 Apr 2018 15:04:14 +0000 (17:04 +0200)
commitc4c86bad1301e8b6b9ac0562475831b17f022b32
tree623d54f10f6ea008a94df5a22988538ea95a9f8f
parentdb90cfeaabac1537b9d01d03665579d76ad8bff1
Pass linker path to build script

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.
src/cargo/core/compiler/custom_build.rs