1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cc.v: hide "mingw" not found message

This commit is contained in:
Alexander Medvednikov 2019-12-12 14:27:47 +03:00
parent 88ec9c235d
commit 8ba29f968a

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
}