mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix v -live -cc gcc examples/hot_reload/graph.v
This commit is contained in:
parent
3a85955d22
commit
202f9574ec
@ -80,9 +80,9 @@ fn (mut g Gen) generate_hotcode_reloading_main_caller() {
|
||||
}
|
||||
vexe := util.cescaped_path(pref.vexe_path())
|
||||
file := util.cescaped_path(g.pref.path)
|
||||
msvc := if g.pref.ccompiler == 'msvc' { '-cc msvc' } else { '' }
|
||||
ccompiler := '-cc $g.pref.ccompiler'
|
||||
so_debug_flag := if g.pref.is_debug { '-cg' } else { '' }
|
||||
vopts := '$msvc $so_debug_flag -sharedlive -shared'
|
||||
vopts := '$ccompiler $so_debug_flag -sharedlive -shared'
|
||||
//
|
||||
g.writeln('\t\t// start background reloading thread')
|
||||
if g.pref.os == .windows {
|
||||
|
@ -5,9 +5,7 @@ import time
|
||||
import dl
|
||||
import v.live
|
||||
|
||||
pub const (
|
||||
is_used = 1
|
||||
)
|
||||
pub const is_used = 1
|
||||
|
||||
// The live reloader code is implemented here.
|
||||
// Note: new_live_reload_info will be called by generated C code inside main()
|
||||
@ -48,10 +46,9 @@ pub fn start_reloader(mut r live.LiveReloadInfo) {
|
||||
spawn reloader(mut r)
|
||||
}
|
||||
|
||||
[if debuglive ?]
|
||||
fn elog(r &live.LiveReloadInfo, s string) {
|
||||
$if debuglive ? {
|
||||
eprintln(s)
|
||||
}
|
||||
eprintln(s)
|
||||
}
|
||||
|
||||
fn compile_and_reload_shared_lib(mut r live.LiveReloadInfo) !bool {
|
||||
|
Loading…
Reference in New Issue
Block a user