Skip to content

Commit d7a418f

Browse files
committed
pref: no-skip-unused
1 parent 65a627d commit d7a418f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ifdef LEGACY
112112
endif
113113
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
114114
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
115-
./v2.exe -o $(VEXE) $(VFLAGS) cmd/v
115+
./v2.exe -nocache -o $(VEXE) $(VFLAGS) cmd/v
116116
rm -rf v1.exe v2.exe
117117
endif
118118
@$(VEXE) run cmd/tools/detect_tcc.v

vlib/v/pref/pref.v

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
251251
res.run_only = os.getenv('VTEST_ONLY_FN').split_any(',')
252252
mut command := ''
253253
mut command_pos := -1
254+
255+
/*
256+
$if macos || linux {
257+
res.use_cache = true
258+
res.skip_unused = true
259+
}
260+
*/
261+
254262
// for i, arg in args {
255263
for i := 0; i < args.len; i++ {
256264
arg := args[i]
@@ -450,6 +458,9 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
450458
'-skip-unused' {
451459
res.skip_unused = true
452460
}
461+
'-no-skip-unused' {
462+
res.skip_unused = false
463+
}
453464
'-compress' {
454465
res.compress = true
455466
}
@@ -796,7 +807,6 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
796807
exit(1)
797808
}
798809

799-
// res.use_cache = true
800810
if command != 'doc' && res.out_name.ends_with('.v') {
801811
eprintln('Cannot save output binary in a .v file.')
802812
exit(1)

0 commit comments

Comments
 (0)