Skip to content

Commit 53c217f

Browse files
committed
cgen: do not generate _vinit() for translated .o code
1 parent 17bba71 commit 53c217f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

vlib/v/gen/c/cgen.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4717,7 +4717,7 @@ fn (g &Gen) checker_bug(s string, pos token.Pos) {
47174717
}
47184718

47194719
fn (mut g Gen) write_init_function() {
4720-
if g.pref.no_builtin {
4720+
if g.pref.no_builtin || (g.pref.translated && g.pref.is_o) {
47214721
return
47224722
}
47234723
util.timing_start(@METHOD)

vlib/v/markused/markused.v

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
1313
defer {
1414
util.timing_measure(@METHOD)
1515
}
16+
// Functions that must be generated and can't be skipped
1617
mut all_fn_root_names := [
1718
'main.main',
1819
'__new_array',

0 commit comments

Comments
 (0)