commit: 4c1a6b824622ebecbc2b75b93e6b128ab2ce5aab
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 27 19:49:45 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Mar 8 05:40:22 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c1a6b82
distutils-r1.eclass: Make vars local before calling filter-lto
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 <mgorny <AT> gentoo.org>
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