compiler: force .exe extension, when compiling on windows

pull/3361/head
Delyan Angelov 2020-01-07 16:42:14 +02:00 committed by Alexander Medvednikov
parent d823d82207
commit fb0817277f
1 changed files with 9 additions and 0 deletions

View File

@ -118,6 +118,15 @@ fn (v mut V) cc() {
verror('-fast is only supported on Linux right now')
}
}
if !v.pref.is_so
&& v.pref.build_mode != .build_module
&& os.user_os() == 'windows'
&& !v.out_name.ends_with('.exe')
{
v.out_name += '.exe'
}
// linux_host := os.user_os() == 'linux'
v.log('cc() isprod=$v.pref.is_prod outname=$v.out_name')
if v.pref.is_so {