summaryrefslogtreecommitdiff
path: root/dev-lang/zig
AgeCommit message (Collapse)Author
2025-09-01dev-lang/zig: update to LLVM 21 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/43618 Closes: https://github.com/gentoo/gentoo/pull/43618 Signed-off-by: Sam James <sam@gentoo.org>
2025-09-01dev-lang/zig: add 0.15.1Arnau Camprubí
Signed-off-by: Arnau Camprubí <arnauxabia@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/43546 Signed-off-by: Sam James <sam@gentoo.org>
2025-07-01dev-lang/zig: Stabilize 0.14.1 amd64, #959358Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-06-13dev-lang/zig: drop 0.14.0Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/42566 Closes: https://github.com/gentoo/gentoo/pull/42566 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-31dev-lang/zig: sync 9999 with 0.14.1Eric Joldasov
See previous commit for details. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/42374 Closes: https://github.com/gentoo/gentoo/pull/42374 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-31dev-lang/zig: add 0.14.1Eric Joldasov
Also removed old notice about standard library documentation and restructuted filter logic for test step arguments. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/42374 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21dev-lang/zig: fix installing in Gentoo PrefixEric Joldasov
Closes: https://bugs.gentoo.org/954126 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/41651 Closes: https://github.com/gentoo/gentoo/pull/41651 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21dev-lang/zig: skip linker script checks for zig executableEric Joldasov
Closes: https://bugs.gentoo.org/951143 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/41651 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21dev-lang/zig: drop 0.13.0-r2Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Part-of: https://github.com/gentoo/gentoo/pull/41651 Signed-off-by: Sam James <sam@gentoo.org>
2025-05-10dev-lang/zig: Stabilize 0.13.0-r3 amd64, #953231Sam James
Signed-off-by: Sam James <sam@gentoo.org>
2025-04-11dev-lang/zig: update to LLVM 20 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/41463 Signed-off-by: Sam James <sam@gentoo.org>
2025-03-05dev-lang/zig: add 0.14.0Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40909 Signed-off-by: Sam James <sam@gentoo.org>
2025-03-04dev-lang/zig: run tests with LLVM enabled and in Debug mode on 9999Eric Joldasov
Upstream uses release mode only for behavior tests, full suite is run primarily with Debug, so other modes tend to fail with strange errors. Seems like no other distro runs them in different modes, so align it with upstream and everyone else. Also restore `RESTRICT=test` for LLVM-disabled builds; it was removed by mistake in some previous commit. Bug: https://bugs.gentoo.org/949878 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40891 Signed-off-by: Sam James <sam@gentoo.org>
2025-03-03zig.eclass: always use absolute path for `--prefix` argumentsin-ack
Needed for correctness when `build.zig` uses them to manipulate default pathes in compiled artifact. Without `DESTDIR` it would try to install to root directly, so to fix this we set `DESTDIR` where appliable. Co-authored-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40197 Signed-off-by: Sam James <sam@gentoo.org>
2025-02-17dev-lang/zig: do not die on `eselect` in `pkg_postrm` (leftover)Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/40598 Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: do not die on `eselect` in `pkg_postrm`Eric Joldasov
Per PMS: > Ebuilds are allowed to call them in pkg_preinst and pkg_postinst. > Ebuilds may also call them in pkg_prerm and pkg_postrm but must not > rely on them being available. Bug: https://bugs.gentoo.org/949225 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: drop 0.13.0-r1Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: use `llvm-r2.eclass`, add cross-compilation support for `USE=llvm`Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/39765 Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: guard `stage3` calls when cross-compilingsin-ack
They can't be run when cross-compiling unless user has qemu static-usr enabled and used, which we can't check in ebuild. Therefore, we need to also disallow docs building when cross-compiling for the time being. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: add `debug` USE-flagEric Joldasov
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>
2025-02-16dev-lang/zig: warn user about `binfmt_misc` when running testssin-ack
If binfmt_misc hooks are installed for QEMU, then running Zig tests will fail because Zig attempts to run executables during tests that may be from foreign architectures. Normally this would raise an "exec format error" failure which Zig handles but binfmt_misc hooks turn it into a "missing interpreter" error instead which is not handled. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2025-02-16dev-lang/zig: do not pass `--libc` when running testssin-ack
When `--libc` is passed to `zig build test`, tests that cross-compile to other OSes and architectures fail because the internal include paths automatically configured by Zig are overridden by the libc installation file. Upstream issue: https://www.github.com/ziglang/zig/issues/22383 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-12-15dev-lang/zig: sync 9999 with 0.13.0-r2Eric Joldasov
* Update to use zig-utils and zig eclasses instead of local get_zig_mcpu etc. functions. * "stage3" compilation is unified by combining build.zig options, now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2" target, after that we use zig.eclass with common options. * Before migrating to the zig.eclass, test steps in src_test have been ran sequentially in for-loop, which allowed logic inside each step to ran parallelly but not several steps at a time. Now we use upstream "test" step instead of separately calling all dependant steps, so that build system can now ran all of them paralelly. This means time spent in `src_test` is now significantly shorter. * "zig2" in both scenarios now has explicit target which is set by using zig-utils.eclass functions on a CBUILD/CHOST. This allows us to skip convertion logic in CMake and bootstrap.c, so that instead of patching them we can just update converter in zig-utils.eclass and unify target behaviour. * Disable autodocs generation for "std" module, since it can now be generated on-fly with `zig std` command. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-12-15dev-lang/zig: add 0.13.0-r2Eric Joldasov
* Update to use llvm-r1 eclass instead of llvm, zig and zig-utils eclasses instead of local get_zig_mcpu etc. functions. * Port "llvm USE-flag" from 9999 ebuild. * "stage3" compilation is unified by combining build.zig options, now both cmake (+llvm) and bootstrap.c (-llvm) build up to "zig2" target, after that we use zig.eclass with common options. * Before migrating to the zig.eclass, test steps in src_test have been ran sequentially in for-loop, which allowed logic inside each step to ran parallelly but not several steps at a time. Now we use upstream "test" step instead of separately calling all dependant steps, so that build system can now ran all of them paralelly. This means time spent in `src_test` is now significantly shorter. * "zig2" in both scenarios now has explicit target which is set by using zig-utils.eclass functions on a CBUILD/CHOST. This allows us to skip convertion logic in CMake and bootstrap.c, so that instead of patching them we can just update converter in zig-utils.eclass and unify target behaviour. * Disable autodocs generation for "std" module, since it can now be generated on-fly with `zig std` command. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/llvmMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/lldMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-12-11Move {sys-devel → llvm-core}/clangMichał Górny
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-11-06dev-lang/zig: fix building 0.13.0 with `sys-devel/llvm-18.1.8-r6`Eric Joldasov
Also, while we are here, sync `.maxrss` fix from 9999 ebuild . Patch message: This is backported PR https://www.github.com/ziglang/zig/pull/21862 , squashed and trimmed down for Zig 0.13.0 . Fixes following error when compiling with sys-devel/llvm-18.1.8-r6: ``` /var/tmp/portage/dev-lang/zig-0.13.0/work/zig-0.13.0/src/zig_llvm.cpp:738:68: error: static assertion failed 738 | static_assert((Triple::EnvironmentType)ZigLLVM_LastEnvironmentType == Triple::LastEnvironmentType, ""); ``` Chronology as I understood it: * New enum tags were added for `Triple::EnvironmentType` to 20.x in https://www.github.com/llvm/llvm-project/pull/111302 , * These additions were backported to 19.1.3 in https://www.github.com/llvm/llvm-project/pull/112364 , at this point Zig upstream (9999) notices static assert failure and fixes in https://www.github.com/ziglang/zig/pull/21862 . Discussed here: https://www.github.com/llvm/llvm-project/pull/112364#discussion_r1823206017 . * These additions were backported again to 18.1.8-r6 (Gentoo only) in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9455b76daa769c03686d18098dbf37690c5c5f61 , this time it causes static assert failure for 0.13.0 . Closes: https://bugs.gentoo.org/942563 Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/39187 Signed-off-by: Sam James <sam@gentoo.org>
2024-09-21dev-lang/zig: update to LLVM 19 for 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/38704 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2024-08-22dev-lang/zig: drop 0.11.0-r1, 0.12.0Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/38005 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
2024-08-07dev-lang/zig: add 0.13.0Aliaksei Urbanski
Release: - https://ziglang.org/download/0.13.0/release-notes.html - https://github.com/ziglang/zig/releases/tag/0.13.0 Closes: https://bugs.gentoo.org/933854 Co-authored-by: Jean-Baptiste "Jiboo" Lepesme <lepesme.jb@gmail.com> Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
2024-08-05dev-lang/zig: fix building with `doc` USE-flag enabled on 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/37703 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
2024-05-20dev-lang/zig: update LLVM to 18, fix build without LLVM on 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/35997 Signed-off-by: Sam James <sam@gentoo.org>
2024-05-20dev-lang/zig: add verify-sig supportEric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Signed-off-by: Sam James <sam@gentoo.org>
2024-05-19dev-lang/zig: add 0.12.00x5a4
Signed-off-by: 0x5a4 <arthur@wienstroer.net> Closes: https://github.com/gentoo/gentoo/pull/36517 Signed-off-by: Sam James <sam@gentoo.org>
2024-03-29*/*: update email on my packagesEric Joldasov
Requested in https://bugs.gentoo.org/867043 . Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net> Closes: https://github.com/gentoo/gentoo/pull/35923 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
2024-02-28dev-lang/zig: add "test-c-import" step in 9999Eric Joldasov
Extracted from "test-behaviour" in https://www.github.com/ziglang/zig/pull/19016 . Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/35457 Signed-off-by: Florian Schmaus <flow@gentoo.org>
2024-02-11dev-lang/zig: Migrate to llvm-r1 in 9999Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/35273 Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-12-13dev-lang/zig: remove ".max_rss" fields initializers from build.zig in 9999Eric Joldasov
They are too high and cause errors like below: * https://www.github.com/ziglang/zig/issues/18263 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/34252 Signed-off-by: Florian Schmaus <flow@gentoo.org>
2023-11-22dev-lang/zig: add `llvm` USE-flag for 9999Eric Joldasov
See upstream PR https://www.github.com/ziglang/zig/pull/17994 and https://www.github.com/ziglang/zig/commit/f8b38a174f0c4a843688fe8adac09dc4f66cd585 . LLVM-less build cannot build `sys-fs/ncdu` yet (no @cImport support), but we are close. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33868 Signed-off-by: Sam James <sam@gentoo.org>
2023-11-22dev-lang/zig{,-bin}: fix getconf patch for instances with whitespaces in ↵Eric Joldasov
between outputs Fixes: 42ac667416fe133255c3baca620e9af61315cb3b Fixes: 69c2497bbaf42a517fe3449f749609b4449b7952 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33871 Signed-off-by: Sam James <sam@gentoo.org>
2023-10-27dev-lang/zig: explicitly set locations for build cacheEric Joldasov
Useful for debugging and a little bit more deterministic than before. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/33272 Signed-off-by: Sam James <sam@gentoo.org>
2023-10-27dev-lang/zig: add simple `zig env` invocation to check if compiler built ↵Eric Joldasov
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>
2023-10-27dev-lang/zig: drop 0.10.1-r3Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2023-10-27dev-lang/zig: patch 0.11.0 to use getconf when detecting glibc versionEric Joldasov
Bug: https://bugs.gentoo.org/914731 Bug: https://bugs.gentoo.org/914101 Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Sam James <sam@gentoo.org>
2023-09-26dev-lang/zig: update to LLVM 17 for 9999Eric Joldasov
See also https://www.github.com/ziglang/zig/pull/17202 . Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32935 Signed-off-by: Sam James <sam@gentoo.org>
2023-08-25dev-lang/zig: add 0.11.0Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
2023-07-27dev-lang/zig: make doc generation for 9999 more reliableEric Joldasov
Use build system steps for automatically following latest changes in doc-generation. This means less frequent breakage, which is good. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32052 Signed-off-by: Sam James <sam@gentoo.org>
2023-07-26dev-lang/zig: fix building on 9999 with "doc" USE-flag enabledEric Joldasov
ZIG_NO_LANGREF variable was disabled in https://github.com/ziglang/zig/commit/32a175740c8750a7db550011795a4c22c0d0bc93. Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me> Closes: https://github.com/gentoo/gentoo/pull/32035 Signed-off-by: Sam James <sam@gentoo.org>
2023-07-09dev-lang/zig: Backport fix for musl 1.2.4Violet Purcell
Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Sam James <sam@gentoo.org>