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 {