feat: support riscv32

This commit is contained in:
Haolan
2025-09-01 14:48:54 +08:00
parent 1b3889ebc9
commit 997ea2849b
15 changed files with 1518 additions and 24 deletions

View File

@@ -317,12 +317,12 @@ func use(goos, goarch string, wasiThreads bool) (export Export, err error) {
export.CCFLAGS = append(
export.CCFLAGS,
"-fdata-sections",
"-ffunction-sections",
// "-ffunction-sections",
)
export.LDFLAGS = append(
export.LDFLAGS,
"-fdata-sections",
"-ffunction-sections",
// "-ffunction-sections",
"-Xlinker",
"--gc-sections",
"-lm",
@@ -612,7 +612,7 @@ func useTarget(targetName string) (export Export, err error) {
baseDir := filepath.Join(cacheRoot(), "crosscompile")
outputDir := filepath.Join(baseDir, config.Libc)
compileConfig, err = getLibcCompileConfigByName(baseDir, config.Libc, config.LLVMTarget)
compileConfig, err = getLibcCompileConfigByName(baseDir, config.Libc, config.LLVMTarget, config.CPU)
if err != nil {
return
}