Put crate_hash and rpath in RUSTFLAGS for Cargo

RUSTFLAGS is used by Cargo and always passed to the compiler. Put our
non-standard crate_hash argument there because it is required for
reproducible builds.

Add the rpath option to avoid having to patch Cargo.toml for this and
remove the function that does so.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
This commit is contained in:
Tyler Hall
2016-07-11 15:15:04 -04:00
parent 5b451ec4af
commit 310cc353a1
2 changed files with 3 additions and 13 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
RUSTC = "rustc"
# FIXME: --sysroot might be needed
RUSTC_ARCHFLAGS += "--target=${TARGET_SYS} -C rpath -C crate_hash=${BB_TASKHASH}"
RUSTFLAGS += "-C rpath -C crate_hash=${BB_TASKHASH}"
RUSTC_ARCHFLAGS += "--target=${TARGET_SYS} ${RUSTFLAGS}"
RUSTLIB_DEP ?= "rustlib"
def rust_base_dep(d):