mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: make builtin, strconv, os work with v build-module
This commit is contained in:
@@ -127,13 +127,16 @@ fn (mut v Builder) set_module_lookup_paths() {
|
||||
}
|
||||
|
||||
pub fn (v Builder) get_builtin_files() []string {
|
||||
if v.pref.build_mode == .build_module && v.pref.path == 'vlib/builtin' { // .contains('builtin/' + location {
|
||||
/*
|
||||
// if v.pref.build_mode == .build_module && v.pref.path == 'vlib/builtin' { // .contains('builtin/' + location {
|
||||
if v.pref.build_mode == .build_module && v.pref.path == 'vlib/strconv' { // .contains('builtin/' + location {
|
||||
// We are already building builtin.o, no need to import them again
|
||||
if v.pref.is_verbose {
|
||||
println('skipping builtin modules for builtin.o')
|
||||
}
|
||||
return []
|
||||
}
|
||||
*/
|
||||
// println('get_builtin_files() lookuppath:')
|
||||
// println(v.pref.lookup_path)
|
||||
// Lookup for built-in folder in lookup path.
|
||||
@@ -163,9 +166,10 @@ Did you forget to add vlib to the path? (Use @vlib for default vlib)')
|
||||
panic('Unreachable code reached.')
|
||||
}
|
||||
|
||||
pub fn (v Builder) get_user_files() []string {
|
||||
if v.pref.path == 'vlib/builtin' {
|
||||
pub fn (v &Builder) get_user_files() []string {
|
||||
if v.pref.path in ['vlib/builtin', 'vlib/strconv'] {
|
||||
// get_builtin_files() has already added the builtin files:
|
||||
v.log('Skipping user files.')
|
||||
return []
|
||||
}
|
||||
mut dir := v.pref.path
|
||||
|
||||
Reference in New Issue
Block a user