diff options
author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-10-20 23:06:17 +0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-27 03:53:04 +0100 |
commit | 2b7185f8742031e9a7acfa5d5e837fc48daaeccd (patch) | |
tree | bfcc449f9b64ce877612654d8ba34dc8d316451d /dev-lang/zig | |
parent | dev-lang/zig: drop 0.10.1-r3 (diff) | |
download | gentoo-2b7185f8742031e9a7acfa5d5e837fc48daaeccd.tar.gz gentoo-2b7185f8742031e9a7acfa5d5e837fc48daaeccd.tar.bz2 gentoo-2b7185f8742031e9a7acfa5d5e837fc48daaeccd.zip |
dev-lang/zig: add simple `zig env` invocation to check if compiler built itself properly
Will make bugs similar to following easier to spot in future because they
will fall earlier and with better error message [than "`zig build std-docs` not found"].
In case "doc" USE-flag and tests are disabled, miscompilation could have been unnoticed by user at all until Zig usage,
since the only calls to Zig binary in ebuild would have been skipped.
Now, it will always check during "src_compile" phase and can reveal
potentially hidden bug.
Bug: https://bugs.gentoo.org/914101
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/zig')
-rw-r--r-- | dev-lang/zig/zig-0.11.0-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/zig/zig-9999.ebuild | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/dev-lang/zig/zig-0.11.0-r1.ebuild b/dev-lang/zig/zig-0.11.0-r1.ebuild index 0984f904d28c..90ffaa485d7e 100644 --- a/dev-lang/zig/zig-0.11.0-r1.ebuild +++ b/dev-lang/zig/zig-0.11.0-r1.ebuild @@ -128,6 +128,8 @@ src_configure() { src_compile() { cmake_src_compile + "${BUILD_DIR}/stage3/bin/zig" env || die "Zig compilation failed" + if use doc; then cd "${BUILD_DIR}" || die edo ./stage3/bin/zig build std-docs --prefix "${S}/docgen/" diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index e6ab3dbeeb61..026d60e5a854 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -124,6 +124,8 @@ src_configure() { src_compile() { cmake_src_compile + "${BUILD_DIR}/stage3/bin/zig" env || die "Zig compilation failed" + if use doc; then cd "${BUILD_DIR}" || die edo ./stage3/bin/zig build std-docs --prefix "${S}/docgen/" |