1
0
forked from rosa/hakurei

internal/rosa/llvm: make source independently available

This is unfortunately still required, due to the monorepo nature of LLVM.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-02 21:47:01 +09:00
parent aa26b86fce
commit e6debce649
2 changed files with 24 additions and 13 deletions

View File

@@ -9,11 +9,6 @@ import (
)
func (t Toolchain) newLLVM() (pkg.Artifact, string) {
const (
version = "22.1.4"
checksum = "Bk3t-tV5sD5T0bqefFMcLeFuAwXnhFipywZmqst5hAZs97QQWGKB_5XyAFjj5tDB"
)
cache := []KV{
{"CMAKE_BUILD_TYPE", "Release"},
@@ -127,11 +122,8 @@ func (t Toolchain) newLLVM() (pkg.Artifact, string) {
}...)
}
return t.NewPackage("llvm", version, t.NewPatchedSource("llvm", version, newFromGitHub(
"llvm/llvm-project",
"llvmorg-"+version,
checksum,
), true, llvmPatches...), nil, &CMakeHelper{
version := t.Version(llvmSource)
return t.NewPackage("llvm", version, t.Load(llvmSource), nil, &CMakeHelper{
Append: []string{"llvm"},
Cache: cache,
@@ -174,6 +166,26 @@ ninja ` + jobsFlagE + ` check-all
), version
}
func init() {
const (
version = "22.1.4"
checksum = "Bk3t-tV5sD5T0bqefFMcLeFuAwXnhFipywZmqst5hAZs97QQWGKB_5XyAFjj5tDB"
)
artifactsM[llvmSource] = Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
return t.NewPatchedSource("llvm", version, newFromGitHub(
"llvm/llvm-project",
"llvmorg-"+version,
checksum,
), true, llvmPatches...), version
},
Name: "llvm-project",
Description: "LLVM monorepo with Rosa OS patches",
ID: 1830,
}
artifactsM[LLVM] = Metadata{
f: Toolchain.newLLVM,
@@ -186,7 +198,5 @@ func init() {
Zstd,
Musl,
},
ID: 1830,
}
}