cc.v: hide "mingw" not found message

pull/3064/head
Alexander Medvednikov 2019-12-12 14:27:47 +03:00
parent 88ec9c235d
commit 8ba29f968a
1 changed files with 5 additions and 3 deletions

View File

@ -14,12 +14,14 @@ fn todo() {
}
fn no_mingw_installed() bool {
fn (v &V) no_mingw_installed() bool {
$if !windows {
panic('no_mingw_installed() can only run on Windows')
}
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 false
@ -70,7 +72,7 @@ fn (v mut V) cc() {
}
}
$if windows {
if v.pref.ccompiler == 'msvc' || no_mingw_installed() {
if v.pref.ccompiler == 'msvc' || v.no_mingw_installed() {
v.cc_msvc()
return
}