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

builder: save the binary next to the source code again

This commit is contained in:
Alexander Medvednikov 2021-03-23 14:50:50 +03:00
parent 6463dfca29
commit 11e1f42193

View File

@ -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)