cgen: do not generate `_vinit()` for translated .o code
parent
17bba712bd
commit
53c217fe5e
|
@ -4717,7 +4717,7 @@ fn (g &Gen) checker_bug(s string, pos token.Pos) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut g Gen) write_init_function() {
|
fn (mut g Gen) write_init_function() {
|
||||||
if g.pref.no_builtin {
|
if g.pref.no_builtin || (g.pref.translated && g.pref.is_o) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
util.timing_start(@METHOD)
|
util.timing_start(@METHOD)
|
||||||
|
|
|
@ -13,6 +13,7 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
|
||||||
defer {
|
defer {
|
||||||
util.timing_measure(@METHOD)
|
util.timing_measure(@METHOD)
|
||||||
}
|
}
|
||||||
|
// Functions that must be generated and can't be skipped
|
||||||
mut all_fn_root_names := [
|
mut all_fn_root_names := [
|
||||||
'main.main',
|
'main.main',
|
||||||
'__new_array',
|
'__new_array',
|
||||||
|
|
Loading…
Reference in New Issue