Merge commit '7de4137d4678a3bcbd735f887028489f97f1e479' into embed-cmds

# Conflicts:
#	internal/build/build.go
This commit is contained in:
Li Jie
2025-09-08 15:22:48 +08:00
14 changed files with 316 additions and 67 deletions

View File

@@ -110,6 +110,7 @@ type Config struct {
GenLL bool // generate pkg .ll files
CheckLLFiles bool // check .ll files valid
CheckLinkArgs bool // check linkargs valid
ForceEspClang bool // force to use esp-clang
Tags string
GlobalNames map[string][]string // pkg => names
GlobalDatas map[string]string // pkg.name => data
@@ -192,7 +193,8 @@ func Do(args []string, conf *Config) ([]Package, error) {
conf.AppExt = defaultAppExt(conf)
}
// Handle crosscompile configuration first to set correct GOOS/GOARCH
export, err := crosscompile.Use(conf.Goos, conf.Goarch, IsWasiThreadsEnabled(), conf.Target)
forceEspClang := conf.ForceEspClang || conf.Target != ""
export, err := crosscompile.Use(conf.Goos, conf.Goarch, conf.Target, IsWasiThreadsEnabled(), forceEspClang)
if err != nil {
return nil, fmt.Errorf("failed to setup crosscompile: %w", err)
}