Skip to content

Commit

Permalink
cgen: fix live mode on windows (#20041)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryuck committed Dec 1, 2023
1 parent 150f225 commit e30af86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions vlib/v/gen/c/fn.v
Expand Up @@ -257,8 +257,10 @@ fn (mut g Gen) gen_fn_decl(node &ast.FnDecl, skip bool) {
// For this purpose, the actual body of the live function,
// is put under a non publicly accessible function, that is prefixed
// with 'impl_live_' .
if is_livemain {
g.hotcode_fn_names << name
if is_livemode {
if is_livefn {
g.hotcode_fn_names << name
}
g.hotcode_fpaths << g.file.path
}
mut impl_fn_name := name
Expand Down
3 changes: 2 additions & 1 deletion vlib/v/gen/c/live.v
Expand Up @@ -80,7 +80,8 @@ fn (mut g Gen) generate_hotcode_reloading_main_caller() {
}
vexe := util.cescaped_path(pref.vexe_path())
file := util.cescaped_path(g.pref.path)
ccompiler := '-cc ${g.pref.ccompiler}'
ccpath := util.cescaped_path(g.pref.ccompiler)
ccompiler := '-cc ${ccpath}'
so_debug_flag := if g.pref.is_debug { '-cg' } else { '' }
vopts := '${ccompiler} ${so_debug_flag} -sharedlive -shared'
//
Expand Down

0 comments on commit e30af86

Please sign in to comment.