5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 04:59:38 +08:00

Fix issues building with darwin/universal target (#4093)

Fixed issues building with `darwin/universal` target
This commit is contained in:
Lea Anthony 2025-02-24 18:53:43 +11:00 committed by GitHub
parent 5be7ee74f8
commit 7aba2c3b95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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)
}

View File

@ -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