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

cc.v: build_module mode fix

Create the modules directory if it's not there.
This commit is contained in:
unknown-v 2019-09-13 19:47:17 +02:00 committed by Alexander Medvednikov
parent c614639e7b
commit 3dc4abddec

View File

@ -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}...')
}