diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-12-18 11:06:49 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-12-18 11:06:49 +0000 |
commit | ab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch) | |
tree | e8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /dev-lang/rust/rust-1.47.0-r2.ebuild | |
parent | 6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff) |
gentoo resync : 18.12.2020
Diffstat (limited to 'dev-lang/rust/rust-1.47.0-r2.ebuild')
-rw-r--r-- | dev-lang/rust/rust-1.47.0-r2.ebuild | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/dev-lang/rust/rust-1.47.0-r2.ebuild b/dev-lang/rust/rust-1.47.0-r2.ebuild index eb492a7361c1..841365e2bef7 100644 --- a/dev-lang/rust/rust-1.47.0-r2.ebuild +++ b/dev-lang/rust/rust-1.47.0-r2.ebuild @@ -169,21 +169,50 @@ boostrap_rust_version_check() { } pre_build_checks() { - local M=6144 - M=$(( $(usex clippy 128 0) + ${M} )) - M=$(( $(usex miri 128 0) + ${M} )) + # minimal useflags with system-llvm and system-bootstrap + local M=7680 + + # approximate component sizes + M=$(( $(usex clippy 256 0) + ${M} )) + M=$(( $(usex miri 256 0) + ${M} )) M=$(( $(usex rls 512 0) + ${M} )) - M=$(( $(usex rustfmt 256 0) + ${M} )) - M=$(( $(usex system-llvm 0 2048) + ${M} )) - M=$(( $(usex wasm 256 0) + ${M} )) + M=$(( $(usex rustfmt 512 0) + ${M} )) + M=$(( $(usex wasm 512 0) + ${M} )) + + # multiply by 1.5 if debug enabled M=$(( $(usex debug 15 10) * ${M} / 10 )) + + # multiply by 1.5 if target-cpu in rustflags + case "${RUSTFLAGS}" in + *target-cpu=*) + M=$(( 15 * ${M} / 10 )) + ;; + esac + + # count all enabled llvm targets + if ! use system-llvm; then + # base requirement is about 2G and 0.5 per llvm target + M=$(( 2048 + ${M} )) + local llvm_target + for llvm_target in ${ALL_LLVM_TARGETS}; do + use "${llvm_target}" && M=$(( 512 + ${M} )) + done + fi + + # multiply by 1.5 if debugging *flags found eshopts_push -s extglob if is-flagq '-g?(gdb)?([1-9])'; then M=$(( 15 * ${M} / 10 )) fi eshopts_pop - M=$(( $(usex system-bootstrap 0 1024) + ${M} )) - M=$(( $(usex doc 256 0) + ${M} )) + + # account for bootstrap compiler + # on ppc64 we unpack both BE and LE archive, so double that. + M=$(( $(usex system-bootstrap 0 $(usex ppc64 2048 1024) ) + ${M} )) + + # docs appended last as those usually don't depend on flags + M=$(( $(usex doc 512 0) + ${M} )) + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} } |