Skip to content

Commit 7aba2c3

Browse files
authored
Fix issues building with darwin/universal target (#4093)
Fixed issues building with `darwin/universal` target
1 parent 5be7ee7 commit 7aba2c3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

v2/pkg/commands/bindings/bindings.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ func GenerateBindings(options Options) (string, error) {
5656
}
5757

5858
envBuild := os.Environ()
59+
arch := options.Arch
60+
if arch == "universal" {
61+
arch = runtime.GOARCH
62+
}
5963
envBuild = shell.SetEnv(envBuild, "GOOS", options.Platform)
60-
envBuild = shell.SetEnv(envBuild, "GOARCH", options.Arch)
64+
envBuild = shell.SetEnv(envBuild, "GOARCH", arch)
6165

62-
stdout, stderr, err = shell.RunCommandWithEnv(envBuild, workingDirectory, options.Compiler, "build", "-buildvcs=false", "-tags", tagString, "-buildvcs=false", "-o", filename)
66+
stdout, stderr, err = shell.RunCommandWithEnv(envBuild, workingDirectory, options.Compiler, "build", "-buildvcs=false", "-tags", tagString, "-o", filename)
6367
if err != nil {
6468
return stdout, fmt.Errorf("%s\n%s\n%s", stdout, stderr, err)
6569
}

website/src/pages/changelog.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
### Fixed
1818
- Fixed [listenerOff issue](https://github.com/wailsapp/wails/issues/3850) by @leaanthony.
19+
- Fixed issues building with `darwin/universal` target by @leaanthony.
1920

2021
## v2.10 - 2025-02-15
2122

0 commit comments

Comments
 (0)