commit:     fa1113f44e2e51c731ee8a5b1d0b216b2daeb4e8
Author:     Eric Joldasov <bratishkaerik <AT> landless-city <DOT> net>
AuthorDate: Thu Mar  6 19:38:29 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 20 00:09:22 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa1113f4

profiles: force llvm USE-flag for Zig on unsupported targets

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 <AT> landless-city.net>
Closes: https://github.com/gentoo/gentoo/pull/40948
Signed-off-by: Sam James <sam <AT> gentoo.org>

 profiles/arch/amd64/package.use.force |  6 +++++-
 profiles/arch/base/package.use.force  | 10 ++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/profiles/arch/amd64/package.use.force 
b/profiles/arch/amd64/package.use.force
index da5032b5b2ec..4d23ba133428 100644
--- a/profiles/arch/amd64/package.use.force
+++ b/profiles/arch/amd64/package.use.force
@@ -1,6 +1,10 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
+# Eric Joldasov <[email protected]> (2025-03-11)
+# "x86_64" backend can succesfully bootstrap itself for Linux.
+>=dev-lang/zig-0.13 -llvm
+
 # James Le Cuirot <[email protected]> (2024-07-02)
 # Needed to build gcc. Force here rather than using BDEPEND to simplify
 # cross-compile scenarios.

diff --git a/profiles/arch/base/package.use.force 
b/profiles/arch/base/package.use.force
new file mode 100644
index 000000000000..7914b1aeb2ca
--- /dev/null
+++ b/profiles/arch/base/package.use.force
@@ -0,0 +1,10 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Eric Joldasov <[email protected]> (2025-03-11)
+# 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

Reply via email to