diff --git a/vlib/v/builder/js.v b/vlib/v/builder/js.v index 87961efbe1..fa06eefc31 100644 --- a/vlib/v/builder/js.v +++ b/vlib/v/builder/js.v @@ -5,6 +5,7 @@ import v.parser import v.pref import v.util import v.gen.js +import v.markused pub fn (mut b Builder) gen_js(v_files []string) string { util.timing_start('PARSE') @@ -16,6 +17,9 @@ pub fn (mut b Builder) gen_js(v_files []string) string { b.checker.check_files(b.parsed_files) util.timing_measure('CHECK') // + if b.pref.skip_unused { + markused.mark_used(mut b.table, b.pref, b.parsed_files) + } b.print_warnings_and_errors() // util.timing_start('JS GEN') diff --git a/vlib/v/builder/x64.v b/vlib/v/builder/x64.v index 58e7551dde..5f1022966f 100644 --- a/vlib/v/builder/x64.v +++ b/vlib/v/builder/x64.v @@ -4,6 +4,7 @@ import v.parser import v.pref import v.util import v.gen.x64 +import v.markused pub fn (mut b Builder) build_x64(v_files []string, out_file string) { $if !linux { @@ -20,6 +21,9 @@ pub fn (mut b Builder) build_x64(v_files []string, out_file string) { b.checker.check_files(b.parsed_files) util.timing_measure('CHECK') // + if b.pref.skip_unused { + markused.mark_used(mut b.table, b.pref, b.parsed_files) + } util.timing_start('x64 GEN') x64.gen(b.parsed_files, b.table, out_file, b.pref) util.timing_measure('x64 GEN')