summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2022-12-07 07:59:30 +0600
committerSam James <sam@gentoo.org>2022-12-14 09:19:10 +0000
commit71cc785aae8ce2453258188b87e307ca42906d32 (patch)
tree6dc119026720c0c91f089c47b42ab242bd8998ce /dev-lang/zig
parentdev-libs/qcoro5: use pkg tag for dev-qt/qtdeclarative (diff)
downloadgentoo-71cc785aae8ce2453258188b87e307ca42906d32.tar.gz
gentoo-71cc785aae8ce2453258188b87e307ca42906d32.tar.bz2
gentoo-71cc785aae8ce2453258188b87e307ca42906d32.zip
dev-lang/zig: relax memory requirements for 9999
https://www.github.com/ziglang/zig/commit/e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118 was merged recently, so memory usage (when building) drops from ~10GB to ~4GB Bug: https://bugs.gentoo.org/823086 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/28581 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/zig')
-rw-r--r--dev-lang/zig/zig-0.10.0.ebuild13
-rw-r--r--dev-lang/zig/zig-9999.ebuild11
2 files changed, 14 insertions, 10 deletions
diff --git a/dev-lang/zig/zig-0.10.0.ebuild b/dev-lang/zig/zig-0.10.0.ebuild
index 0ab54280a9ba..c4a1219ddb22 100644
--- a/dev-lang/zig/zig-0.10.0.ebuild
+++ b/dev-lang/zig/zig-0.10.0.ebuild
@@ -21,7 +21,8 @@ SLOT="0"
BUILD_DIR="${S}/build"
-# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend (non-LLVM backends don't require these).
+# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend.
+# (non-LLVM backends don't require these)
# They are not required "on their own", so please don't add them here.
# You can check https://github.com/ziglang/zig-bootstrap in future, to see
# options that are passed to LLVM CMake building (excluding "static" ofc).
@@ -52,6 +53,9 @@ llvm_check_deps() {
pkg_setup() {
llvm_pkg_setup
+ ewarn "This version requires 10G of memory for building compiler."
+ ewarn "If you don't have enough memory, you can wait until 0.11.0 release"
+ ewarn "or (if you are risky) use 9999 version (currently requires only 4GB)"
check-reqs_pkg_setup
}
@@ -73,9 +77,10 @@ src_test() {
pkg_postinst() {
elog "0.10.0 release introduces self-hosted compiler for general use by default"
elog "It means that your code can be un-compilable since this compiler has some new or removed features and new or fixed bugs"
- elog "Upstream recommends using stage1 if experiencing such breakage,"
- elog "until bugfix release 0.10.1 or release 0.11.0 where old compiler will be fully replaced"
- elog "You can use old compiler by using '-fstage1' flag"
+ elog "Upstream recommends:"
+ elog " * Using old compiler if experiencing such breakage (flag '-fstage1')"
+ elog " * Waiting for bugfix release 0.10.1"
+ elog " * Waiting for release 0.11.0 with old compiler removed (these changes are already merged in 9999)"
elog "Also see: https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler"
elog "and https://ziglang.org/download/0.10.0/release-notes.html#How-to-Upgrade"
}
diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
index a19a2873f8cd..04794281b8d8 100644
--- a/dev-lang/zig/zig-9999.ebuild
+++ b/dev-lang/zig/zig-9999.ebuild
@@ -21,7 +21,8 @@ SLOT="0"
BUILD_DIR="${S}/build"
-# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend (non-LLVM backends don't require these).
+# Zig requires zstd and zlib compression support in LLVM, if using LLVM backend.
+# (non-LLVM backends don't require these)
# They are not required "on their own", so please don't add them here.
# You can check https://github.com/ziglang/zig-bootstrap in future, to see
# options that are passed to LLVM CMake building (excluding "static" ofc).
@@ -39,11 +40,9 @@ RDEPEND="
# see https://github.com/ziglang/zig/issues/3382
QA_FLAGS_IGNORED="usr/bin/zig"
-# see https://ziglang.org/download/0.10.0/release-notes.html#Self-Hosted-Compiler
-# 0.10.0 release - 9.6 GiB, since we use compiler written in C++ for bootstrapping
-# 0.11.0 release - ~2.8 GiB, since we will (at least according to roadmap) use self-hosted compiler
-# (transpiled to C via C backend) for bootstrapping
-CHECKREQS_MEMORY="10G"
+# Since commit https://github.com/ziglang/zig/commit/e7d28344fa3ee81d6ad7ca5ce1f83d50d8502118
+# Zig uses self-hosted compiler only
+CHECKREQS_MEMORY="4G"
llvm_check_deps() {
has_version "sys-devel/clang:${LLVM_SLOT}"