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 1C7DA158041 for ; Sat, 9 Mar 2024 20:00:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA79AE2A44; Sat, 9 Mar 2024 20:00:06 +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 5B6B0E2A32 for ; Sat, 9 Mar 2024 20:00:06 +0000 (UTC) Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-dc745927098so2839681276.3 for ; Sat, 09 Mar 2024 12:00:04 -0800 (PST) X-Gm-Message-State: AOJu0YyVfgJM0EXG0j6+7AYzXQ98J9aazAeP5hzMVJIn2zAqtRmswXGi eR7qvwrfqy36t0PC3eOtumATpYCi27LdthPnXeIJnezEdsU2faqyD0q8GXt4iNa+WjdRzb/s87M KRMv5haDMs39cm3uQiOa/YTeKEJk= X-Google-Smtp-Source: AGHT+IGkUP2SpAOdg90i7umFpbaY6ZBcPAZiAEd93s+Sv2CrcNDpedmxx90khPKmB8ohJGJboV/fu/0ZEGYWE/qPp2I= X-Received: by 2002:a25:d810:0:b0:dcc:787:e8f9 with SMTP id p16-20020a25d810000000b00dcc0787e8f9mr1746872ybg.51.1710014401162; Sat, 09 Mar 2024 12:00:01 -0800 (PST) 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 References: <20240305171812.125985-1-mgorny@gentoo.org> <20240305171812.125985-5-mgorny@gentoo.org> In-Reply-To: <20240305171812.125985-5-mgorny@gentoo.org> From: Mike Gilbert Date: Sat, 9 Mar 2024 14:59:50 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [gentoo-dev] [PATCH v2 4/7] distutils-r1.eclass: Make vars local before calling filter-lto To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 4fd00ebe-3aae-46ba-8590-d16eb1e28eaf X-Archives-Hash: c5665eabf61e90c69f44adc4f07e8b49 On Tue, Mar 5, 2024 at 12:16=E2=80=AFPM Micha=C5=82 G=C3=B3rny wrote: > > Make LTO filtering local to the compilation code. This avoids disabling > LTO for non-Python parts of an ebuild. > > Signed-off-by: Micha=C5=82 G=C3=B3rny > --- > 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 compile= r > # 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}=3D${!x}" > + done > filter-lto > fi > fi I had never thought to loop over all-flag-vars like this. Added to my mental code repo, thanks!