1
0
forked from rosa/hakurei

internal/rosa/llvm: migrate musl

This removes the pointless special treatment given to musl.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-14 00:35:06 +09:00
parent a7f7ce1795
commit ac825640ab
5 changed files with 32 additions and 33 deletions

View File

@@ -4,7 +4,6 @@ import "hakurei.app/internal/pkg"
func (t Toolchain) newMusl(
headers bool,
env []string,
extra ...pkg.Artifact,
) (pkg.Artifact, string) {
const (
@@ -47,7 +46,15 @@ rmdir -v /work/lib
// expected to be writable in copies
Chmod: true,
Env: env,
Env: stage0ExclConcat(t, []string{
"CC=clang",
"LIBCC=/system/lib/clang/" + llvmVersionMajor + "/lib/" +
triplet() + "/libclang_rt.builtins.a",
"AR=ar",
"RANLIB=ranlib",
},
"LDFLAGS="+earlyLDFLAGS(false),
),
}, &helper,
Coreutils,
), version
@@ -55,7 +62,7 @@ rmdir -v /work/lib
func init() {
artifactsM[Musl] = Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
return t.newMusl(false, nil)
return t.newMusl(false, t.Load(LLVMCompilerRT))
},
Name: "musl",