From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E4B9159C96 for ; Wed, 24 Jul 2024 22:08:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 42B4CE2AC5; Wed, 24 Jul 2024 22:08:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0BE7E2ABB for ; Wed, 24 Jul 2024 22:08:14 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH 3/3] cargo.eclass: Explicitly tell rustc not to strip binaries Date: Wed, 24 Jul 2024 23:07:57 +0100 Message-ID: <20240724220800.16994-3-chewi@gentoo.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240724220800.16994-1-chewi@gentoo.org> References: <20240724220800.16994-1-chewi@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: b4712822-bcd4-4404-9dc9-c96ecb075664 X-Archives-Hash: a0d94da3f54d150d224b154a64ffa386 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 --- eclass/cargo.eclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 65eaee6f84e4b..7ae40608aeb5a 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -550,14 +550,14 @@ cargo_env() { local LD_A=( ${HOST_CC} ${BUILD_LDFLAGS} ) declare -x CARGO_BUILD_RUSTFLAGS="-C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && declare CARGO_BUILD_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" - declare CARGO_BUILD_RUSTFLAGS+=" ${RUSTFLAGS} ${CARGO_BUILD_RUSTFLAGS}" + declare CARGO_BUILD_RUSTFLAGS+=" -C strip=none ${RUSTFLAGS} ${CARGO_BUILD_RUSTFLAGS}" if tc-is-cross-compiler; then declare -x CARGO_BUILD_TARGET=$(rust_abi) local TRIPLE=${CARGO_BUILD_TARGET//-/_} LD_A=( $(tc-getCC) ${LDFLAGS} ) declare -x CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS="-C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && declare CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" - declare CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS+=" ${RUSTFLAGS} ${CARGO_TARGET_RUSTFLAGS}" + declare CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS+=" -C strip=none ${RUSTFLAGS} ${CARGO_TARGET_RUSTFLAGS}" else CARGO_BUILD_RUSTFLAGS+=" ${CARGO_TARGET_RUSTFLAGS}" fi -- 2.45.2