From 3dc4abddecee878681edfae1525767155e03da8f Mon Sep 17 00:00:00 2001 From: unknown-v <52547845+unknown-v@users.noreply.github.com> Date: Fri, 13 Sep 2019 19:47:17 +0200 Subject: [PATCH] cc.v: build_module mode fix Create the modules directory if it's not there. --- compiler/cc.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/cc.v b/compiler/cc.v index 5750cf9520..bc015c6cdc 100644 --- a/compiler/cc.v +++ b/compiler/cc.v @@ -41,6 +41,10 @@ fn (v mut V) cc() { v.out_name = v.out_name + '.so' } if v.pref.build_mode == .build_module { + // Create the modules directory if it's not there. + if !os.file_exists(ModPath) { + os.mkdir(ModPath) + } v.out_name = ModPath + v.dir + '.o' //v.out_name println('Building ${v.out_name}...') }