1
0
forked from rosa/hakurei

internal/rosa/llvm: autodetect stage0 target

This is fine, now that stages beyond stage0 have explicit target.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-14 03:10:26 +09:00
parent 78f9676b1f
commit 5c2345128e

View File

@@ -1,10 +1,6 @@
package rosa
import (
"runtime"
"hakurei.app/internal/pkg"
)
import "hakurei.app/internal/pkg"
func init() {
artifactsM[llvmSource] = Metadata{
@@ -146,17 +142,7 @@ func init() {
func (t Toolchain) newClang() (pkg.Artifact, string) {
target := "'AArch64;RISCV;X86'"
if t.isStage0() {
switch runtime.GOARCH {
case "386", "amd64":
target = "X86"
case "arm64":
target = "AArch64"
case "riscv64":
target = "RISCV"
default:
panic("unsupported target " + runtime.GOARCH)
}
target = "Native"
}
return t.NewPackage("clang", llvmVersion, t.Load(llvmSource), &PackageAttr{