aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-02 21:47:01 +0900
committerOphestra <cat@gensokyo.uk>2026-05-02 21:47:01 +0900
commite6debce649366c54406b41a8f8a0be64fabd9aa8 (patch)
treef988e4500a42e6a90204eacdeeedd3cae40ae468 /internal/rosa
parentaa26b86fce9f5daf241d659c82a067f4fe0384d1 (diff)
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>
Diffstat (limited to 'internal/rosa')
-rw-r--r--internal/rosa/all.go3
-rw-r--r--internal/rosa/llvm.go34
2 files changed, 24 insertions, 13 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go
index fb745c0a..6f0aefcc 100644
--- a/internal/rosa/all.go
+++ b/internal/rosa/all.go
@@ -171,7 +171,8 @@ const (
// PresetUnexportedStart is the first unexported preset.
PresetUnexportedStart
- buildcatrust = iota - 1
+ llvmSource = iota - 1
+ buildcatrust
utilMacros
// Musl is a standalone libc that does not depend on the toolchain.
diff --git a/internal/rosa/llvm.go b/internal/rosa/llvm.go
index a4bdb2c6..feba103c 100644
--- a/internal/rosa/llvm.go
+++ b/internal/rosa/llvm.go
@@ -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,
}
}