summaryrefslogtreecommitdiff
path: root/dev-lang/zig/zig-9999.ebuild
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@landless-city.net>2024-12-18 02:23:02 +0500
committerSam James <sam@gentoo.org>2025-02-16 16:24:54 +0000
commiteaaa8b9b68a6d7c6f8d36bced910856c0860413f (patch)
treef4ecefa8cf7936b99024e38dafdd6f7c648a9bcc /dev-lang/zig/zig-9999.ebuild
parentb5ac3a5296fd73fbd9efe3443724e6547222e815 (diff)
downloadgentoo-eaaa8b9b68a6d7c6f8d36bced910856c0860413f.tar.gz
gentoo-eaaa8b9b68a6d7c6f8d36bced910856c0860413f.tar.bz2
gentoo-eaaa8b9b68a6d7c6f8d36bced910856c0860413f.zip
dev-lang/zig: add `debug` USE-flag
Controls debug extensions such as `zig dump-zir` or `zig build-exe --debug-compile-errors` and can change default when building Zig itself from `ReleaseFast` to `ReleaseSafe`. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/zig/zig-9999.ebuild')
-rw-r--r--dev-lang/zig/zig-9999.ebuild7
1 files changed, 5 insertions, 2 deletions
diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild
index 9fe4558461eb..dda68889ca43 100644
--- a/dev-lang/zig/zig-9999.ebuild
+++ b/dev-lang/zig/zig-9999.ebuild
@@ -43,7 +43,7 @@ fi
# lib/libc/glibc: BSD HPND ISC inner-net LGPL-2.1+
LICENSE="MIT Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT ) || ( Apache-2.0-with-LLVM-exceptions Apache-2.0 MIT BSD-2 ) public-domain BSD-2 ZPL ISC HPND BSD inner-net LGPL-2.1+"
SLOT="${ZIG_SLOT}"
-IUSE="doc +llvm"
+IUSE="debug doc +llvm"
REQUIRED_USE="
!llvm? ( !doc )
llvm? ( ${LLVM_REQUIRED_USE} )
@@ -142,7 +142,10 @@ src_configure() {
-Dno-langref
-Dstd-docs=false
- --release=fast
+ # More commands and options if "debug" is enabled.
+ -Ddebug-extensions=$(usex debug true false)
+ # More asserts and so on by default if "debug" is enabled.
+ --release=$(usex debug safe fast)
)
if use llvm; then
my_zbs_args+=(