From 6299a73e90510bb48a21f08badc802ed0da94656 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 26 Nov 2021 12:05:29 +0200 Subject: [PATCH] builder: prepare for `v -b native -os windows run file.v` --- vlib/v/builder/native.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vlib/v/builder/native.v b/vlib/v/builder/native.v index d9dce6711a..8ad5d1b0b0 100644 --- a/vlib/v/builder/native.v +++ b/vlib/v/builder/native.v @@ -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') }