• [gentoo-dev] [PATCH] profiles: force llvm USE-flag for Zig on unsupport

    From Eric Joldasov@21:1/5 to All on Sat Mar 8 17:20:02 2025
    Add an allowlist of targets where Zig can bootstrap itself without LLVM,
    and allow disabling `llvm` USE-flag only on that targets.

    Saves users from cryptic errors when they unknowingly try to use it on
    ARM or other architecture, and help a little bit with future keywording.

    Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
    ---
    profiles/base/package.use.force | 8 ++++++++
    profiles/default/linux/amd64/package.use.force (new) | 6 ++++++
    2 files changed, 14 insertions(+)

    diff --git a/profiles/base/package.use.force b/profiles/base/package.use.force index 1f239ebb9cb8..7e30c4ea27b2 100644
    --- a/profiles/base/package.use.force
    +++ b/profiles/base/package.use.force
    @@ -1,6 +1,14 @@
    # Copyright 1999-2025 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    +# Eric Joldasov <bratishkaerik@landless-city.net> (2025-03-08)
    +# Force building Zig with LLVM extensions enabled. Non-LLVM backends
    +# are in active development, and while some backends progressed enough
    +# to build some simple or complex program, only small amount of them
    +# can succesfully bootstrap Zig.
    +# Unforce on targets where it's possible to bootstrap without LLVM. +dev-lang/zig llvm
    +
    # Joonas Niilola <juippis@gentoo.org> (2025-03-05)
    # 136.0 can't be compiled with "-rust-extensions".
    ~mail