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

cache builtin modules

This commit is contained in:
Alexander Medvednikov
2020-04-10 18:11:43 +02:00
parent c815f84722
commit f76931c01e
9 changed files with 73 additions and 18 deletions

View File

@@ -104,6 +104,8 @@ fn main() {
else {}
}
if command in ['run', 'build'] || command.ends_with('.v') || os.exists(command) {
println('command')
println(prefs.path)
builder.compile(command, prefs)
return
}
@@ -177,6 +179,10 @@ fn parse_args(args []string) (&pref.Preferences, string) {
res.path = args[command_pos+1]
res.run_args = args[command_pos+1..]
}
if command == 'build' {
res.build_mode = .build_module
res.path = args[command_pos+1]
}
if res.is_verbose {
println('setting pref.path to "$res.path"')
}