diff --git a/v2/pkg/commands/bindings/bindings.go b/v2/pkg/commands/bindings/bindings.go index 4d41227ca..28b5bca0d 100644 --- a/v2/pkg/commands/bindings/bindings.go +++ b/v2/pkg/commands/bindings/bindings.go @@ -56,10 +56,14 @@ func GenerateBindings(options Options) (string, error) { } envBuild := os.Environ() + arch := options.Arch + if arch == "universal" { + arch = runtime.GOARCH + } envBuild = shell.SetEnv(envBuild, "GOOS", options.Platform) - envBuild = shell.SetEnv(envBuild, "GOARCH", options.Arch) + envBuild = shell.SetEnv(envBuild, "GOARCH", arch) - stdout, stderr, err = shell.RunCommandWithEnv(envBuild, workingDirectory, options.Compiler, "build", "-buildvcs=false", "-tags", tagString, "-buildvcs=false", "-o", filename) + stdout, stderr, err = shell.RunCommandWithEnv(envBuild, workingDirectory, options.Compiler, "build", "-buildvcs=false", "-tags", tagString, "-o", filename) if err != nil { return stdout, fmt.Errorf("%s\n%s\n%s", stdout, stderr, err) } diff --git a/website/src/pages/changelog.mdx b/website/src/pages/changelog.mdx index 84e358285..6bf199aec 100644 --- a/website/src/pages/changelog.mdx +++ b/website/src/pages/changelog.mdx @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed [listenerOff issue](https://github.com/wailsapp/wails/issues/3850) by @leaanthony. +- Fixed issues building with `darwin/universal` target by @leaanthony. ## v2.10 - 2025-02-15