aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-08-25 15:04:57 +0900
committerOphestra <cat@gensokyo.uk>2026-08-25 15:26:35 +0900
commitce53fa9249df44e0321f880adf8dd1d4ba0e8c60 (patch)
tree0bdb1768fad3d0e89d0e2e5131bb317a7c7e43b1 /internal
parent18ba73c9571f4dbf07a14c980c4bb86d234fa136 (diff)
internal/rosa/llvm: early-runtimes for gentoo stage only
This bootstrap step is not required for a native Rosa OS stage0 distribution. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/llvm.go2
-rw-r--r--internal/rosa/llvm_test.go2
-rw-r--r--internal/rosa/rosa.go5
3 files changed, 7 insertions, 2 deletions
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go
index 85f4292d..9e958639 100644
--- a/internal/rosa/llvm.go
+++ b/internal/rosa/llvm.go
@@ -64,7 +64,7 @@ func init() {
meta.Version = _meta.Version
early := _muslHeaders
- if t.stage.isStage0() {
+ if t.stage.isStage0() && !t.stage.isRosa() {
// The LLVM build system uses the system installation when building with
// LLVM_LINK_LLVM_DYLIB, since it builds runtimes after the fact, using
// the just-built toolchain. This is unacceptable in stage0 due to the
diff --git a/internal/rosa/llvm_test.go b/internal/rosa/llvm_test.go
index 42b0b540..52562579 100644
--- a/internal/rosa/llvm_test.go
+++ b/internal/rosa/llvm_test.go
@@ -8,7 +8,7 @@ import (
)
func TestLLVMInputs(t *testing.T) {
- const wantInputCount = 470
+ const wantInputCount = 466
_, llvm := rosa.MustLoad(rosa.H("llvm"))
var n int
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index 2a7cd777..7b06700c 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -129,6 +129,11 @@ const (
_stageEnd
)
+// isRosa returns whether t is derived from a Rosa OS stage0.
+func (t Stage) isRosa() bool {
+ return t >= stageEarly
+}
+
// isStage0 returns whether t is a stage0 toolchain.
func (t Stage) isStage0() bool {
switch t {