From 11e1f421936994f18ff80070a581f8f13bad9538 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 23 Mar 2021 14:50:50 +0300 Subject: [PATCH] builder: save the binary next to the source code again --- vlib/v/pref/default.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/pref/default.v b/vlib/v/pref/default.v index ba85fec395..50e7d55da0 100644 --- a/vlib/v/pref/default.v +++ b/vlib/v/pref/default.v @@ -46,7 +46,9 @@ pub fn (mut p Preferences) fill_with_defaults() { // The file name is just `.v` or `.vsh` or `.*` base = filename } - // target_dir := if os.is_dir(rpath) { rpath } else { os.dir(rpath) } + target_dir := if os.is_dir(rpath) { rpath } else { os.dir(rpath) } + p.out_name = os.join_path(target_dir, base) + // TODO (maybe) // If no "-o" was supplied, create the binary in the current // directory. This is the behavior of Go, Clang, GCC, etc. p.out_name = os.join_path(os.getwd(), base)