Skip to content

Commit 977a625

Browse files
committed
tools: support v -prod up
1 parent 302baaa commit 977a625

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/tools/vup.v

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import v.util.recompilation
77

88
struct App {
99
is_verbose bool
10+
is_prod bool
1011
vexe string
1112
vroot string
1213
}
@@ -16,6 +17,7 @@ fn new_app() App {
1617
vroot := os.dir(vexe)
1718
return App{
1819
is_verbose: '-v' in os.args
20+
is_prod: '-prod' in os.args
1921
vexe: vexe
2022
vroot: vroot
2123
}
@@ -66,7 +68,8 @@ fn (app App) update_from_master() {
6668

6769
fn (app App) recompile_v() {
6870
// NB: app.vexe is more reliable than just v (which may be a symlink)
69-
vself := '"$app.vexe" self'
71+
opts := if app.is_prod { '-prod' } else { '' }
72+
vself := '"$app.vexe" $opts self'
7073
app.vprintln('> recompiling v itself with `$vself` ...')
7174
if self_result := os.exec(vself) {
7275
if self_result.exit_code == 0 {

0 commit comments

Comments
 (0)