compiler: allow -debug to work with no prebuilt modules. only use when prebuilt files exist (#2283)

* only use prebuilt modules if they exist (builtin)
pull/2285/head
joe-conigliaro 2019-10-10 23:00:18 +11:00 committed by GitHub
parent 7423b21429
commit 1b79964827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -111,7 +111,12 @@ fn (v mut V) cc() {
a << '-c'
}
else if v.pref.is_debug {
libs = '$v_modules_path/vlib/builtin.o '
builtin_o_path := '$v_modules_path/vlib/builtin.o'
if os.file_exists(builtin_o_path) {
libs = builtin_o_path
} else {
println('$builtin_o_path not found... build module builtin')
}
// '$v_modules_path/vlib/strings.o '+
// '$v_modules_path/vlib/math.o '
/*