internal/rosa/llvm: populate metadata
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m38s
Test / Hakurei (push) Successful in 3m39s
Test / ShareFS (push) Successful in 3m47s
Test / Sandbox (race detector) (push) Successful in 4m56s
Test / Hakurei (race detector) (push) Successful in 5m52s
Test / Flake checks (push) Successful in 1m37s
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m38s
Test / Hakurei (push) Successful in 3m39s
Test / ShareFS (push) Successful in 3m47s
Test / Sandbox (race detector) (push) Successful in 4m56s
Test / Hakurei (race detector) (push) Successful in 5m52s
Test / Flake checks (push) Successful in 1m37s
This enables use of release monitoring for LLVM. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -15,8 +15,12 @@ import (
|
||||
type PArtifact int
|
||||
|
||||
const (
|
||||
LLVMCompilerRT PArtifact = iota
|
||||
LLVMRuntimes
|
||||
LLVMClang
|
||||
|
||||
// ImageInitramfs is the Rosa OS initramfs archive.
|
||||
ImageInitramfs PArtifact = iota
|
||||
ImageInitramfs
|
||||
|
||||
// Kernel is the generic Rosa OS Linux kernel.
|
||||
Kernel
|
||||
|
||||
@@ -73,12 +73,12 @@ func llvmFlagName(flag int) string {
|
||||
}
|
||||
}
|
||||
|
||||
const llvmVersion = "21.1.8"
|
||||
|
||||
// newLLVMVariant returns a [pkg.Artifact] containing a LLVM variant.
|
||||
func (t Toolchain) newLLVMVariant(variant string, attr *llvmAttr) pkg.Artifact {
|
||||
const (
|
||||
version = "21.1.8"
|
||||
checksum = "8SUpqDkcgwOPsqHVtmf9kXfFeVmjVxl4LMn-qSE1AI_Xoeju-9HaoPNGtidyxyka"
|
||||
)
|
||||
const checksum = "8SUpqDkcgwOPsqHVtmf9kXfFeVmjVxl4LMn-qSE1AI_Xoeju-9HaoPNGtidyxyka"
|
||||
|
||||
if attr == nil {
|
||||
panic("LLVM attr must be non-nil")
|
||||
}
|
||||
@@ -161,9 +161,9 @@ ln -s ld.lld /work/system/bin/ld
|
||||
)
|
||||
}
|
||||
|
||||
return t.NewPackage("llvm", version, pkg.NewHTTPGetTar(
|
||||
return t.NewPackage("llvm", llvmVersion, pkg.NewHTTPGetTar(
|
||||
nil, "https://github.com/llvm/llvm-project/archive/refs/tags/"+
|
||||
"llvmorg-"+version+".tar.gz",
|
||||
"llvmorg-"+llvmVersion+".tar.gz",
|
||||
mustDecode(checksum),
|
||||
pkg.TarGzip,
|
||||
), &PackageAttr{
|
||||
@@ -489,6 +489,40 @@ index 64324a3f8b01..15ce70b68217 100644
|
||||
|
||||
return
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LLVMCompilerRT] = Metadata{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
_, compilerRT, _, _ := t.newLLVM()
|
||||
return compilerRT, llvmVersion
|
||||
},
|
||||
|
||||
Name: "llvm-compiler-rt",
|
||||
Description: "LLVM runtime: compiler-rt",
|
||||
Website: "https://llvm.org/",
|
||||
}
|
||||
|
||||
artifactsM[LLVMRuntimes] = Metadata{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
_, _, runtimes, _ := t.newLLVM()
|
||||
return runtimes, llvmVersion
|
||||
},
|
||||
|
||||
Name: "llvm-runtimes",
|
||||
Description: "LLVM runtimes: libunwind, libcxx, libcxxabi",
|
||||
Website: "https://llvm.org/",
|
||||
}
|
||||
|
||||
artifactsM[LLVMClang] = Metadata{
|
||||
f: func(t Toolchain) (pkg.Artifact, string) {
|
||||
_, _, _, clang := t.newLLVM()
|
||||
return clang, llvmVersion
|
||||
},
|
||||
|
||||
Name: "clang",
|
||||
Description: `an "LLVM native" C/C++/Objective-C compiler`,
|
||||
Website: "https://llvm.org/",
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
// llvm stores the result of Toolchain.newLLVM.
|
||||
|
||||
Reference in New Issue
Block a user