1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

pref: no-skip-unused

This commit is contained in:
Alexander Medvednikov 2023-03-06 14:13:29 +01:00
parent 65a627d72b
commit d7a418fbb5
2 changed files with 12 additions and 2 deletions

View File

@ -112,7 +112,7 @@ ifdef LEGACY
endif
$(CC) $(CFLAGS) -std=gnu99 -w -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
./v2.exe -o $(VEXE) $(VFLAGS) cmd/v
./v2.exe -nocache -o $(VEXE) $(VFLAGS) cmd/v
rm -rf v1.exe v2.exe
endif
@$(VEXE) run cmd/tools/detect_tcc.v

View File

@ -251,6 +251,14 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
res.run_only = os.getenv('VTEST_ONLY_FN').split_any(',')
mut command := ''
mut command_pos := -1
/*
$if macos || linux {
res.use_cache = true
res.skip_unused = true
}
*/
// for i, arg in args {
for i := 0; i < args.len; i++ {
arg := args[i]
@ -450,6 +458,9 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
'-skip-unused' {
res.skip_unused = true
}
'-no-skip-unused' {
res.skip_unused = false
}
'-compress' {
res.compress = true
}
@ -796,7 +807,6 @@ pub fn parse_args_and_show_errors(known_external_commands []string, args []strin
exit(1)
}
// res.use_cache = true
if command != 'doc' && res.out_name.ends_with('.v') {
eprintln('Cannot save output binary in a .v file.')
exit(1)