mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
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>
This commit is contained in:
committed by
Sam James
parent
d4277ad4e6
commit
dc51935f7a
@@ -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[@]} "$@"
|
||||
|
||||
Reference in New Issue
Block a user