File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import v.util.recompilation
7
7
8
8
struct App {
9
9
is_verbose bool
10
+ is_prod bool
10
11
vexe string
11
12
vroot string
12
13
}
@@ -16,6 +17,7 @@ fn new_app() App {
16
17
vroot := os.dir (vexe)
17
18
return App{
18
19
is_verbose: '-v' in os.args
20
+ is_prod: '-prod' in os.args
19
21
vexe: vexe
20
22
vroot: vroot
21
23
}
@@ -66,7 +68,8 @@ fn (app App) update_from_master() {
66
68
67
69
fn (app App) recompile_v () {
68
70
// 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'
70
73
app.vprintln ('> recompiling v itself with `$vself ` ...' )
71
74
if self_result := os.exec (vself) {
72
75
if self_result.exit_code == 0 {
You can’t perform that action at this time.
0 commit comments