forked from rosa/hakurei
internal/rosa/package: migrate llvm patches
LLVM itself is unlikely to ever be migrated due to complexity of the bootstrap, so migrate patches instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
@@ -48,6 +50,24 @@ func litArgs(verbose bool, skipChecks ...string) string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
var llvmPatches []KV
|
||||
for _, name := range [...]string{
|
||||
"increase-stack-size-unconditional",
|
||||
"add-rosa-vendor",
|
||||
"xfail-broken-tests",
|
||||
"path-system-include",
|
||||
"path-system-libraries",
|
||||
} {
|
||||
p, err := fs.ReadFile(nativeB, "package/llvm/"+name+".patch")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
llvmPatches = append(llvmPatches, KV{
|
||||
name,
|
||||
unsafe.String(unsafe.SliceData(p), len(p)),
|
||||
})
|
||||
}
|
||||
|
||||
native.MustRegister("early-compiler-rt", func(t Toolchain) (*Metadata, pkg.Artifact) {
|
||||
meta := Metadata{
|
||||
Name: "early-compiler-rt",
|
||||
|
||||
Reference in New Issue
Block a user