diff --git a/vlib/v/builder/cc.v b/vlib/v/builder/cc.v index 4ed10d06fd..e3dd853a25 100644 --- a/vlib/v/builder/cc.v +++ b/vlib/v/builder/cc.v @@ -248,18 +248,7 @@ fn (mut v Builder) cc() { } else { println('$path not found... building module $imp') - if path.ends_with('vlib/ui.o') { - println('copying ui...') - os.cp('$vdir/thirdparty/ui/ui.o', path)or{ - panic('error copying ui files') - } - os.cp('$vdir/thirdparty/ui/ui.vh', pref.default_module_path + '/vlib/ui.vh')or{ - panic('error copying ui files') - } - } - else { - os.system('$vexe build module vlib${os.path_separator}$imp_path') - } + os.system('$vexe build module vlib${os.path_separator}$imp_path') } if path.ends_with('vlib/ui.o') { a << '-framework Cocoa -framework Carbon' @@ -270,18 +259,12 @@ fn (mut v Builder) cc() { if v.pref.sanitize { a << '-fsanitize=leak' } - // Cross compiling linux TODO - /* - sysroot := '/tmp/lld/linuxroot/' - if v.os == .linux && !linux_host { - // Build file.o - a << '-c --sysroot=$sysroot -target x86_64-linux-gnu' - // Right now `out_name` can be `file`, not `file.o` - if !v.out_name.ends_with('.o') { - v.out_name = v.out_name + '.o' + // Cross compiling linux + if v.pref.os == .linux { + $if !linux { + v.cc_linux_cross() } } - */ // Cross compiling windows // // Output executable name @@ -489,6 +472,18 @@ If you're confident that all of the above is true, please try running V with the } } +fn (mut c Builder) cc_linux_cross() { + /* + sysroot := '/tmp/lld/linuxroot/' + // Build file.o + a << '-c --sysroot=$sysroot -target x86_64-linux-gnu' + // Right now `out_name` can be `file`, not `file.o` + if !v.out_name.ends_with('.o') { + v.out_name = v.out_name + '.o' + } + */ +} + fn (mut c Builder) cc_windows_cross() { println('Cross compiling for Windows...') if !c.pref.out_name.ends_with('.exe') {