cc.v: hide "mingw" not found message
parent
88ec9c235d
commit
8ba29f968a
|
@ -14,12 +14,14 @@ fn todo() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn no_mingw_installed() bool {
|
fn (v &V) no_mingw_installed() bool {
|
||||||
$if !windows {
|
$if !windows {
|
||||||
panic('no_mingw_installed() can only run on Windows')
|
panic('no_mingw_installed() can only run on Windows')
|
||||||
}
|
}
|
||||||
os.exec('gcc -v') or {
|
os.exec('gcc -v') or {
|
||||||
println('mingw not found, trying to build with msvc...')
|
if v.pref.is_verbose {
|
||||||
|
println('mingw not found, trying to build with msvc...')
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -70,7 +72,7 @@ fn (v mut V) cc() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$if windows {
|
$if windows {
|
||||||
if v.pref.ccompiler == 'msvc' || no_mingw_installed() {
|
if v.pref.ccompiler == 'msvc' || v.no_mingw_installed() {
|
||||||
v.cc_msvc()
|
v.cc_msvc()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue