diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2023-02-08 16:49:47 -0800 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-07-12 07:24:42 +0100 |
commit | dc51935f7aae5f89d1ffecabef322680979952b8 (patch) | |
tree | 542e7723e3487d87768387ec880173ebd67cd2ba /eclass/cargo.eclass | |
parent | x11-drivers/nvidia-drivers: add 525.47.31:0/vulkan, drop 525.47.27 (diff) | |
download | gentoo-dc51935f7aae5f89d1ffecabef322680979952b8.tar.gz gentoo-dc51935f7aae5f89d1ffecabef322680979952b8.tar.bz2 gentoo-dc51935f7aae5f89d1ffecabef322680979952b8.zip |
cargo.eclass: filter out lto flags for C/CXX compilers
we do it in src_compile to avoid excessive flag stripping in projects
using cargo.eclass just to fetch crates.
Bug: https://bugs.gentoo.org/903908
Closes: https://bugs.gentoo.org/893658
Closes: https://bugs.gentoo.org/910220
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/cargo.eclass')
-rw-r--r-- | eclass/cargo.eclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass index 2ff1f042ba79..70b6008d9cd8 100644 --- a/eclass/cargo.eclass +++ b/eclass/cargo.eclass @@ -43,7 +43,7 @@ case ${EAPI} in ;; esac -inherit multiprocessing toolchain-funcs +inherit flag-o-matic multiprocessing toolchain-funcs [[ ! ${CARGO_OPTIONAL} ]] && BDEPEND="${RUST_DEPEND}" @@ -513,6 +513,7 @@ cargo_src_compile() { [[ ${_CARGO_GEN_CONFIG_HAS_RUN} ]] || \ die "FATAL: please call cargo_gen_config before using ${FUNCNAME}" + filter-lto tc-export AR CC CXX PKG_CONFIG set -- cargo build $(usex debug "" --release) ${ECARGO_ARGS[@]} "$@" |