builder: allow `-compress` to work on windows too, when `upx` is installed (#14252)

Allow `-compress` flag on Windows if upx is installed. If upx not installed, same behavior as on linux/mac
Isaiah 2022-05-02 07:28:31 -04:00 committed by Jef Roosens
parent 8d1cc6a817
commit 9a1d73f622
Signed by: Jef Roosens
GPG Key ID: B75D4F293C7052DB
1 changed files with 1 additions and 5 deletions

View File

@ -661,10 +661,6 @@ pub fn (mut v Builder) cc() {
break break
} }
if v.pref.compress { if v.pref.compress {
$if windows {
println('-compress does not work on Windows for now')
return
}
ret := os.system('strip $v.pref.out_name') ret := os.system('strip $v.pref.out_name')
if ret != 0 { if ret != 0 {
println('strip failed') println('strip failed')
@ -685,7 +681,7 @@ pub fn (mut v Builder) cc() {
println('install upx\n' + 'for example, on Debian/Ubuntu run `sudo apt install upx`') println('install upx\n' + 'for example, on Debian/Ubuntu run `sudo apt install upx`')
} }
$if windows { $if windows {
// :) println('install upx')
} }
} }
} }