internal/rosa/llvm: libclc artifact

This is built independently of llvm build system to avoid having to build llvm again.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-12 22:57:04 +09:00
parent 11b3171180
commit 081d6b463c
2 changed files with 20 additions and 0 deletions

View File

@@ -77,6 +77,7 @@ const (
LibXau
Libbsd
Libcap
Libclc
Libev
Libexpat
Libffi

View File

@@ -42,6 +42,7 @@ const (
llvmRuntimeLibc
llvmRuntimeLibcxx
llvmRuntimeLibcxxABI
llvmRuntimeLibclc
llvmAll = 1<<iota - 1
llvmRuntimeAll = llvmAll - (2 * llvmProjectAll) - 1
@@ -65,6 +66,8 @@ func llvmFlagName(flag int) string {
return "libcxx"
case llvmRuntimeLibcxxABI:
return "libcxxabi"
case llvmRuntimeLibclc:
return "libclc"
default:
panic("invalid flag " + strconv.Itoa(flag))
@@ -541,6 +544,22 @@ func init() {
ID: 1830,
}
artifactsM[Libclc] = Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
return t.newLLVMVariant("libclc", &llvmAttr{
cmake: []KV{
{"LIBCLC_TARGETS_TO_BUILD", "all"},
},
append: []string{"libclc"},
script: "ninja test",
}), llvmVersion
},
Name: "libclc",
Description: "an open source, BSD/MIT dual licensed implementation of the library requirements of the OpenCL C programming language",
Website: "https://libclc.llvm.org/",
}
}
var (