Skip to content

Commit 4a6941a

Browse files
committed
markused, builtin: apply @[markused] to builtin_init, remove its heuristic from markused.v
1 parent 21d9a5d commit 4a6941a

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎vlib/builtin/builtin_nix.c.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// that can be found in the LICENSE file.
44
module builtin
55

6+
@[markused]
67
fn builtin_init() {
78
$if gcboehm ? {
89
$if !gc_warn_on_stderr ? {

‎vlib/builtin/builtin_windows.c.v‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const enable_processed_output = 1
6363
const enable_wrap_at_eol_output = 2
6464
const evable_virtual_terminal_processing = 4
6565

66+
@[markused]
6667
fn builtin_init() {
6768
$if gcboehm ? {
6869
$if !gc_warn_on_stderr ? {

‎vlib/v/markused/markused.v‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ pub fn mark_used(mut table ast.Table, mut pref_ pref.Preferences, ast_files []&a
6060
if pref_.is_bare {
6161
core_fns << 'init_global_allocator' // needed for linux_bare and wasm_bare
6262
}
63-
if ast_files[ast_files.len - 1].imports.len > 0 {
64-
core_fns << 'builtin_init'
65-
}
6663
if 'use_libbacktrace' in pref_.compile_defines {
6764
core_fns << 'print_libbacktrace'
6865
}

0 commit comments

Comments
 (0)