Merge pull request #965 from stffabi/feature/winguildflag-crosscompile

[v2] Add windowsgui ldflag when crosscompiling for windows
This commit is contained in:
Lea Anthony 2021-11-23 10:39:10 -08:00 committed by GitHub
commit 53a3cd9422
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,7 +243,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error {
if options.Mode == Production {
ldflags.Add("-w", "-s")
if runtime.GOOS == "windows" {
if options.Platform == "windows" {
ldflags.Add("-H windowsgui")
}
}