diff options
-rw-r--r-- | eclass/cargo.eclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 548aaef3ed69..7db34efb4e17 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -319,6 +319,16 @@ _cargo_gen_git_config() { fi } +# @FUNCTION: cargo_target_dir +# @DESCRIPTION: +# Return the directory within target that contains the build, e.g. +# target/aarch64-unknown-linux-gnu/release. +cargo_target_dir() { + local abi + tc-is-cross-compiler && abi=/$(rust_abi) + echo "${CARGO_TARGET_DIR:-target}${abi}/$(usex debug debug release)" +} + # @FUNCTION: cargo_src_unpack # @DESCRIPTION: # Unpacks the package and the cargo registry. |