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 BF86E158041 for ; Tue, 5 Mar 2024 17:19:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7D3D0E2A16; Tue, 5 Mar 2024 17:18:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 385B4E2A0E for ; Tue, 5 Mar 2024 17:18:22 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH v2 4/7] distutils-r1.eclass: Make vars local before calling filter-lto Date: Tue, 5 Mar 2024 18:16:33 +0100 Message-ID: <20240305171812.125985-5-mgorny@gentoo.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240305171812.125985-1-mgorny@gentoo.org> References: <20240305171812.125985-1-mgorny@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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: c9504aa9-139f-438f-9709-326b1e03943a X-Archives-Hash: 47fefdf6673ce9d0052a8017a8e39cb9 Make LTO filtering local to the compilation code. This avoids disabling LTO for non-Python parts of an ebuild. Signed-off-by: Michał Górny --- eclass/distutils-r1.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index ee1dcef24ff6..134cb39f276a 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1828,6 +1828,10 @@ distutils-r1_run_phase() { # Rust extensions are incompatible with C/C++ LTO compiler # see e.g. https://bugs.gentoo.org/910220 if has cargo ${INHERITED}; then + local x + for x in $(all-flag-vars); do + local -x "${x}=${!x}" + done filter-lto fi fi -- 2.44.0