mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
live: always add os and time when compiling -live programs
Fixes fail when -live user programs do not use os and time.
This commit is contained in:

committed by
Alexander Medvednikov

parent
7ffa315566
commit
f68d9d1a16
@ -91,7 +91,7 @@ fn (v &V) generate_hot_reload_code() {
|
||||
}
|
||||
|
||||
so_debug_flag := if v.pref.is_debug { '-g' } else { '' }
|
||||
cmd_compile_shared_library := '$vexe $msvc $so_debug_flag -o $file_base -shared $file'
|
||||
cmd_compile_shared_library := '$vexe $msvc $so_debug_flag -o $file_base -solive -shared $file'
|
||||
if v.pref.show_c_cmd {
|
||||
println(cmd_compile_shared_library)
|
||||
}
|
||||
@ -187,7 +187,7 @@ void reload_so() {
|
||||
#else
|
||||
sprintf(new_so_name, "%s.so", new_so_base);
|
||||
#endif
|
||||
sprintf(compile_cmd, "$vexe $msvc -o %s -shared $file", new_so_base);
|
||||
sprintf(compile_cmd, "$vexe $msvc -o %s -solive -shared $file", new_so_base);
|
||||
os__system(tos2(compile_cmd));
|
||||
|
||||
if( !os__exists(tos2(new_so_name)) ) {
|
||||
|
Reference in New Issue
Block a user