1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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
This commit is contained in:
Isaiah 2022-05-02 07:28:31 -04:00 committed by GitHub
parent 968d2b4654
commit a4fd349cf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -661,10 +661,6 @@ pub fn (mut v Builder) cc() {
break
}
if v.pref.compress {
$if windows {
println('-compress does not work on Windows for now')
return
}
ret := os.system('strip $v.pref.out_name')
if ret != 0 {
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`')
}
$if windows {
// :)
println('install upx')
}
}
}