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

When compiling with -shared (a step in compiling with -live), store the C intermediary file in a different file than main (loader) file, so that debugging symbol lookup information is correct (the files are not replaced constantly with each other).

This commit is contained in:
Delyan Angelov 2019-07-15 10:09:23 +03:00 committed by Alexander Medvednikov
parent 60ad97c4fb
commit 0556f5fd4e

View File

@ -942,7 +942,7 @@ fn new_v(args[]string) *V {
exit(1)
}
}
out_name_c := out_name.all_after('/') + '.c'
mut out_name_c := out_name.all_after('/') + '.c'
mut files := []string
// Add builtin files
if !out_name.contains('builtin.o') {
@ -974,7 +974,12 @@ fn new_v(args[]string) *V {
is_run: args.contains('run')
is_repl: args.contains('-repl')
build_mode: build_mode
}
if pref.is_so {
out_name_c = out_name.all_after('/') + '_shared_lib.c'
}
return &V {
os: _os
out_name: out_name