feat: add target name design

This commit is contained in:
Haolan
2025-08-29 19:25:09 +08:00
parent 53e22488c8
commit 1b3889ebc9
6 changed files with 22 additions and 25 deletions

View File

@@ -1,18 +1,19 @@
package rtlib
import (
"fmt"
"path/filepath"
"github.com/goplus/llgo/internal/crosscompile/compile"
)
func GetCompilerRTConfig(baseDir, arch string) *compile.CompileConfig {
func GetCompilerRTConfig(baseDir, target string) *compile.CompileConfig {
return &compile.CompileConfig{
Url: "https://github.com/goplus/compiler-rt/archive/refs/tags/v0.1.0.tar.gz",
ArchiveSrcDir: "compiler-rt-0.1.0",
Groups: []compile.CompileGroup{
{
OutputFileName: "libclang_builtins.a",
OutputFileName: fmt.Sprintf("libclang_builtins-%s.a", target),
Files: []string{
filepath.Join(baseDir, "lib", "builtins", "xtensa/ieee754_sqrtf.S"),
filepath.Join(baseDir, "lib", "builtins", "absvdi2.c"),