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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 141961382C5 for ; Wed, 16 Dec 2020 20:50:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54166E08F3; Wed, 16 Dec 2020 20:50:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 39346E08F3 for ; Wed, 16 Dec 2020 20:50:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E14E1340DF9 for ; Wed, 16 Dec 2020 20:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 50F1147 for ; Wed, 16 Dec 2020 20:49:57 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1608151778.ec98673b8287ce4dabcd8b673b2d4b56e86a173e.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/rust-1.47.0-r2.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: ec98673b8287ce4dabcd8b673b2d4b56e86a173e X-VCS-Branch: master Date: Wed, 16 Dec 2020 20:49:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 70d305f3-5b0d-4eb5-be75-978b1d3443f4 X-Archives-Hash: 6f4c848cc6c13afbbd74a3a684dafdf0 commit: ec98673b8287ce4dabcd8b673b2d4b56e86a173e Author: Georgy Yakovlev gentoo org> AuthorDate: Wed Dec 16 20:49:38 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Dec 16 20:49:38 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec98673b dev-lang/rust: update requirements check function Bug: https://bugs.gentoo.org/757276 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/rust-1.47.0-r2.ebuild | 45 ++++++++++++++++++++++++++++++------- 1 file 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 eb492a7361c..841365e2bef 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} }