diff options
author | James Le Cuirot <chewi@gentoo.org> | 2024-07-24 22:59:16 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-08-06 10:30:11 +0200 |
commit | 7d7c5168294a4d90681c8d3ab6ac985c4eba1643 (patch) | |
tree | 5753ec83e26fb5c8aeedb64559dbe7781391627b /eclass | |
parent | cargo.eclass: Handle LDFLAGS and RUSTFLAGS better (diff) | |
download | gentoo-7d7c5168294a4d90681c8d3ab6ac985c4eba1643.tar.gz gentoo-7d7c5168294a4d90681c8d3ab6ac985c4eba1643.tar.bz2 gentoo-7d7c5168294a4d90681c8d3ab6ac985c4eba1643.zip |
cargo.eclass: Explicitly tell rustc not to strip binaries
Most projects don't strip binaries in release mode by default, but there
are exceptions like app-misc/broot.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cargo.eclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index ef927aac50cd..99a7959b22e2 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -267,7 +267,7 @@ cargo_gen_config() { # with USE=nightly. There is no simple way around this. tc-export_build_env local LD_A=( $(tc-getBUILD_CC) ${BUILD_LDFLAGS} ) - local MY_BUILD_RUSTFLAGS="-C linker=${LD_A[0]}" + local MY_BUILD_RUSTFLAGS="-C strip=none -C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && MY_BUILD_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" MY_BUILD_RUSTFLAGS+=" ${RUSTFLAGS} ${BUILD_RUSTFLAGS}" tc-is-cross-compiler || MY_BUILD_RUSTFLAGS+=" ${TARGET_RUSTFLAGS}" @@ -564,7 +564,7 @@ cargo_env() { local -x CARGO_BUILD_TARGET=$(rust_abi) local TRIPLE=${CARGO_BUILD_TARGET//-/_} local TRIPLE=${TRIPLE^^} LD_A=( $(tc-getCC) ${LDFLAGS} ) - local -x CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS="-C linker=${LD_A[0]}" + local -x CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS="-C strip=none -C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && local CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" local CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+=" ${RUSTFLAGS} ${TARGET_RUSTFLAGS}" fi |