diff --git a/vlib/v/builder/rebuilding.v b/vlib/v/builder/rebuilding.v index ee8aac0c1f..c2f13547d1 100644 --- a/vlib/v/builder/rebuilding.v +++ b/vlib/v/builder/rebuilding.v @@ -211,7 +211,7 @@ fn (mut b Builder) handle_usecache(vexe string) { // strconv is already imported inside builtin, so skip generating its object file // TODO: incase we have other modules with the same name, make sure they are vlib // is this even doign anything? - if imp in ['strconv', 'strings', 'dlmalloc'] { + if util.module_is_builtin(imp) { continue } if imp in built_modules { diff --git a/vlib/v/util/util.v b/vlib/v/util/util.v index 0178ef749d..12e0372348 100644 --- a/vlib/v/util/util.v +++ b/vlib/v/util/util.v @@ -37,12 +37,8 @@ const ( ] ) -const builtin_module_names = ['builtin', 'strconv', 'strings', 'dlmalloc', 'math'] - pub fn module_is_builtin(mod string) bool { - // NOTE: using util.builtin_module_parts here breaks -usecache on macos - return mod in util.builtin_module_names - // return mod in util.builtin_module_parts + return mod in util.builtin_module_parts } pub fn tabs(n int) string {