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 18D60159C96 for ; Thu, 25 Jul 2024 11:21:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73BC1E2AE4; Thu, 25 Jul 2024 11:20:54 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 20B62E2AE1 for ; Thu, 25 Jul 2024 11:20:54 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: James Le Cuirot Subject: [gentoo-dev] [PATCH 3/5 v3] cargo.eclass: Explicitly tell rustc not to strip binaries Date: Thu, 25 Jul 2024 12:19:36 +0100 Message-ID: <20240725112005.10045-7-chewi@gentoo.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240725112005.10045-3-chewi@gentoo.org> References: <20240725112005.10045-3-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: bcd64f88-0dde-4ad0-b271-302fbf8af1a0 X-Archives-Hash: 447da4ca5ea179cd9a898f70d8b9aca7 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 596598ca8585a..44d3f7ee31f59 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -548,13 +548,13 @@ cargo_env() { # RUSTFLAGS. The given linker cannot include any arguments, so split these # into link-args along with LDFLAGS. Also include external RUSTFLAGS. local LD_A=( ${HOST_CC} ${BUILD_LDFLAGS} ) - local -x CARGO_BUILD_RUSTFLAGS="${RUSTFLAGS} ${CARGO_BUILD_RUSTFLAGS} -C linker=${LD_A[0]}" + local -x CARGO_BUILD_RUSTFLAGS="-C strip=none ${RUSTFLAGS} ${CARGO_BUILD_RUSTFLAGS} -C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && local CARGO_BUILD_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" if tc-is-cross-compiler; then local -x CARGO_BUILD_TARGET=$(rust_abi) local TRIPLE=${CARGO_BUILD_TARGET//-/_} LD_A=( $(tc-getCC) ${LDFLAGS} ) - local -x CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS="${RUSTFLAGS} ${CARGO_TARGET_RUSTFLAGS} -C linker=${LD_A[0]}" + local -x CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS="-C strip=none ${RUSTFLAGS} ${CARGO_TARGET_RUSTFLAGS} -C linker=${LD_A[0]}" [[ ${#LD_A[@]} -gt 1 ]] && local CARGO_TARGET_"${TRIPLE^^}"_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' "${LD_A[@]:1}")" else CARGO_BUILD_RUSTFLAGS+=" ${CARGO_TARGET_RUSTFLAGS}" -- 2.45.2