builder: prepare for `v -b native -os windows run file.v`

pull/12582/head
Delyan Angelov 2021-11-26 12:05:29 +02:00
parent 85633fe546
commit 6299a73e90
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,10 @@ import os
pub fn (mut b Builder) build_native(v_files []string, out_file string) {
if b.pref.os == .windows {
eprintln('Warning: v -native is experimental for Windows')
if !b.pref.is_shared && b.pref.build_mode != .build_module
&& !b.pref.out_name.ends_with('.exe') {
b.pref.out_name += '.exe'
}
} else if b.pref.os !in [.linux, .macos] {
eprintln('Warning: v -native can only generate macOS and Linux binaries for now')
}