From 1b79964827a925f7975075c3aadd33b538761f39 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Thu, 10 Oct 2019 23:00:18 +1100 Subject: [PATCH] compiler: allow -debug to work with no prebuilt modules. only use when prebuilt files exist (#2283) * only use prebuilt modules if they exist (builtin) --- compiler/cc.v | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/compiler/cc.v b/compiler/cc.v index 2a4dec43af..87ff86fc7f 100644 --- a/compiler/cc.v +++ b/compiler/cc.v @@ -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 ' /*