pref: rename keep_c
parent
18faaefe82
commit
f005079e0b
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Reference in New Issue