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:
parent
88ec9c235d
commit
8ba29f968a
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user