mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builder: cleanup commented cross compilation code in cc.v
This commit is contained in:
parent
d53d95991d
commit
fe87d20f20
@ -777,7 +777,7 @@ fn (mut b Builder) cc_linux_cross() {
|
||||
verror(res.output)
|
||||
return
|
||||
}
|
||||
println(out_name + ' has been successfully compiled')
|
||||
println(out_name + ' has been successfully cross compiled for linux.')
|
||||
}
|
||||
|
||||
fn (mut c Builder) cc_windows_cross() {
|
||||
@ -839,21 +839,6 @@ fn (mut c Builder) cc_windows_cross() {
|
||||
} else {
|
||||
args << cflags.c_options_after_target()
|
||||
}
|
||||
/*
|
||||
winroot := '${pref.default_module_path}/winroot'
|
||||
if !os.is_dir(winroot) {
|
||||
winroot_url := 'https://github.com/vlang/v/releases/download/v0.1.10/winroot.zip'
|
||||
println('"$winroot" not found.')
|
||||
println('Download it from $winroot_url and save it in ${pref.default_module_path}')
|
||||
println('Unzip it afterwards.\n')
|
||||
println('winroot.zip contains all library and header files needed ' + 'to cross-compile for Windows.')
|
||||
exit(1)
|
||||
}
|
||||
mut obj_name := c.out_name
|
||||
obj_name = obj_name.replace('.exe', '')
|
||||
obj_name = obj_name.replace('.o.o', '.o')
|
||||
include := '-I $winroot/include '
|
||||
*/
|
||||
if os.user_os() !in ['macos', 'linux', 'termux'] {
|
||||
println(os.user_os())
|
||||
panic('your platform is not supported yet')
|
||||
@ -883,20 +868,7 @@ fn (mut c Builder) cc_windows_cross() {
|
||||
}
|
||||
exit(1)
|
||||
}
|
||||
/*
|
||||
if c.pref.build_mode != .build_module {
|
||||
link_cmd := 'lld-link $obj_name $winroot/lib/libcmt.lib ' + '$winroot/lib/libucrt.lib $winroot/lib/kernel32.lib $winroot/lib/libvcruntime.lib ' + '$winroot/lib/uuid.lib'
|
||||
if c.pref.show_cc {
|
||||
println(link_cmd)
|
||||
}
|
||||
if os.system(link_cmd) != 0 {
|
||||
println('Cross compilation for Windows failed. Make sure you have lld linker installed.')
|
||||
exit(1)
|
||||
}
|
||||
// os.rm(obj_name)
|
||||
}
|
||||
*/
|
||||
println(c.pref.out_name + ' has been successfully compiled')
|
||||
println(c.pref.out_name + ' has been successfully cross compiled for windows.')
|
||||
}
|
||||
|
||||
fn (mut b Builder) build_thirdparty_obj_files() {
|
||||
|
Loading…
Reference in New Issue
Block a user