Skip to content

Commit 94e35b7

Browse files
committed
markused: fix C compilation failures on -skip-unused -profile
1 parent 81d694b commit 94e35b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vlib/v/markused/markused.v

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ pub fn mark_used(mut table ast.Table, pref &pref.Preferences, ast_files []&ast.F
186186
all_fn_root_names << k
187187
continue
188188
}
189+
if pref.is_prof {
190+
if k.starts_with('time.vpc_now') || k.starts_with('v.profile.') {
191+
// needed for -profile
192+
all_fn_root_names << k
193+
continue
194+
}
195+
}
196+
189197
if method_receiver_typename == '&sync.Channel' {
190198
all_fn_root_names << k
191199
continue

0 commit comments

Comments
 (0)