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