diff --git a/cmd/v/v.v b/cmd/v/v.v index b6b410f1e9..6799a3202d 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -169,7 +169,7 @@ fn parse_args(args []string) (&pref.Preferences, string) { res.is_cache = true } '-keepc' { - res.is_keep_c = true + res.keep_c = true } '-x64' { res.backend = .x64 diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 8187c2ead2..a38c5f3e8f 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -442,7 +442,7 @@ If you're confident that all of the above is true, please try running V with the println('linux cross compilation done. resulting binary: "$v.out_name"') } */ - if !v.pref.is_keep_c && v.out_name_c != 'v.c' { + if !v.pref.keep_c && v.out_name_c != 'v.c' { os.rm(v.out_name_c) } if v.pref.compress { diff --git a/vlib/v/builder/msvc.v b/vlib/v/builder/msvc.v index ced37237a4..c5770a1a03 100644 --- a/vlib/v/builder/msvc.v +++ b/vlib/v/builder/msvc.v @@ -191,7 +191,7 @@ fn find_msvc() ?MsvcResult { pub fn (mut v Builder) cc_msvc() { r := find_msvc() or { // TODO: code reuse - if !v.pref.is_keep_c && v.out_name_c != 'v.c' && v.out_name_c != 'v_macos.c' { + if !v.pref.keep_c && v.out_name_c != 'v.c' && v.out_name_c != 'v_macos.c' { os.rm(v.out_name_c) } verror('Cannot find MSVC on this OS') @@ -300,7 +300,7 @@ pub fn (mut v Builder) cc_msvc() { } // println(res) // println('C OUTPUT:') - if !v.pref.is_keep_c && v.out_name_c != 'v.c' && v.out_name_c != 'v_macos.c' { + if !v.pref.keep_c && v.out_name_c != 'v.c' && v.out_name_c != 'v_macos.c' { os.rm(v.out_name_c) } // Always remove the object file - it is completely unnecessary diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index ddf6233236..c82b3a9636 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -40,7 +40,7 @@ pub mut: sanitize bool // use Clang's new "-fsanitize" option is_debug bool // false by default, turned on by -g or -cg, it tells v to pass -g to the C backend compiler. is_vlines bool // turned on by -g, false by default (it slows down .tmp.c generation slightly). - is_keep_c bool // -keep_c , tell v to leave the generated .tmp.c alone (since by default v will delete them after c backend finishes) + keep_c bool // -keepc , tell v to leave the generated .tmp.c alone (since by default v will delete them after c backend finishes) show_cc bool // -showcc, print cc command // NB: passing -cg instead of -g will set is_vlines to false and is_g to true, thus making v generate cleaner C files, // which are sometimes easier to debug / inspect manually than the .tmp.c files by plain -g (when/if v line number generation breaks).