summaryrefslogtreecommitdiff
path: root/dev-lang/rust
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/rust')
-rw-r--r--dev-lang/rust/Manifest2
-rw-r--r--dev-lang/rust/rust-1.47.0-r2.ebuild45
2 files changed, 38 insertions, 9 deletions
diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
index d066320ec4ea..7ede91133a53 100644
--- a/dev-lang/rust/Manifest
+++ b/dev-lang/rust/Manifest
@@ -52,6 +52,6 @@ DIST rustc-1.46.0-src.tar.xz 101868452 BLAKE2B da9798596b124a10d79c236a871228f05
DIST rustc-1.47.0-src.tar.xz 104143736 BLAKE2B 0454094dde35275488046826da87655e51bf0795481d6d08fd70d644bfc12481bca8641166106ef32f20494906025244715b16ff21a1c023f4bd2818aab42521 SHA512 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9
DIST rustc-1.48.0-src.tar.xz 105951736 BLAKE2B 42468fc5ac5e80c4793cfe0913cbb8e43a8def28cc8cf5ed25ab989561e2bf33e155c83e180183362535cbc9008f341eb1273087a2364672b1a4032ac2d6ca45 SHA512 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23
EBUILD rust-1.46.0.ebuild 17326 BLAKE2B b43d06f2b122762ce157174cfe821d4d1c93e5050d982ae2a29b9fea8a14744fdea755b5e98f49d66a87d1736a6457172193f4ca7e01cedc3469018daf46d28e SHA512 d1ac91bd59796b6f4b136cddffd404dee48ad00bb9c72b6bd9992b0a9950924c3f65d4df66a59f27b5522b01a54141df4b707db7d285d10cd10b2d1581358fe2
-EBUILD rust-1.47.0-r2.ebuild 18035 BLAKE2B 2eb52d7fc671048b1c7f7e066a4f542e4ee011b2509639c0b630bac683f8cc1b49921b686b3ca670dec1218f7501122ccf22b8d727c13894015e97471a0bac1a SHA512 33cda30b2b08eada1b809b42f8a839953edd6471b52f5dc0fa134e655e63cc5467de9b9804bc8a0e20c82bee1b327c67fd684b5353f82f1c5cac19de93513a7d
+EBUILD rust-1.47.0-r2.ebuild 18737 BLAKE2B 1f9295e1356bc3b64ed50650d0436da91121d4b998e2c89f60021f6d5b927b914a7c641cd88853df5c8a8de041e61bf85701229d158b629f52bacfc8272c6f43 SHA512 48760ec9a6ae193f81c0748184e955aa138decb91a0612c6e0da791517f09ca0b2ff383e89d4dcd4946bbbbf23fc2ef36011f18fd8cdf61f26a97ce53590385e
EBUILD rust-1.48.0.ebuild 18057 BLAKE2B b59c23dfad5f6be2fa654f955e14bb4838d0dd75aba5a53bd4dfa1347a996f2d54ac9a20bde5219df8fe1070c64111f46cdb91002b439fb7b5cc80ac553b5da6 SHA512 e2d9e47a57275cdeb4ea62f54067d7a3b301f380f0e467a87c6fb516e651e064f25d77f268578d45aa5bf750855a53f1bd7e545b4c103d5d7c967537d3d0cd26
MISC metadata.xml 1083 BLAKE2B 7a7b093c22dcaef58bd67f9c2fd84a000696b234d2bc27315999bf6751cfd2a79441fd22efc284a542ecc84ce1a12ff9ca3495d249eaffa5bc1722b385c6109e SHA512 bfe8c140753e93db67244c92e9a7d193691ceb67de796c30a851966a1262bc5c897ead6e13d728775fa524215b6851609dcbee582022d9d75bb8d1e6fabc4ef4
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}
}