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 9EC09159C9B for ; Wed, 7 Aug 2024 16:02:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B3A72BC019; Wed, 7 Aug 2024 16:02:43 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 2E182E2DB0 for ; Wed, 7 Aug 2024 16:02:43 +0000 (UTC) From: James Le Cuirot To: gentoo-dev Cc: rust@gentoo.org, James Le Cuirot Subject: [gentoo-dev] [PATCH 0/2] cargo.eclass: Change RUSTFLAGS approach following recent build failures Date: Wed, 7 Aug 2024 16:52:10 +0100 Message-ID: <20240807160221.1035675-1-chewi@gentoo.org> X-Mailer: git-send-email 2.45.2 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: 9ac335c9-f64a-4af6-8264-8dfa4780b4a0 X-Archives-Hash: 5766dd5149f1414f8ec4a202aa65590b Unfortunately, my recent cargo.eclass changes didn't fare so well, despite me testing it on a good handful of packages. I've had to sharply change tack to work around Cargo's shortcomings. The first commit has the main change. I'd like to merge that very soon to put out the immediate fire. The second commit tries to address a lingering downside where project-specific flags may get overridden by our own. This was happening, even before I changed anything for users or ebuilds setting RUSTFLAGS, but now it is more likely to happen. I'm unsure of this change because it is a little controverial, using app-misc/yq's tomlq (a jq wrapper) to read flags from the project's config files. On the plus side, it should avoid upstreams complaining that we're not using their flags. See what you think. I've kept it in a separate commit so that it can easily be backed out. James Le Cuirot (2): cargo.eclass: Change RUSTFLAGS approach following recent build failures cargo.eclass: Preserve project-specific [build] flags by reading config eclass/cargo.eclass | 73 ++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 27 deletions(-) -- 2.45.2