mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Prevent people on platforms that arent 'windows' from being able to build with msvc
This commit is contained in:

committed by
Alexander Medvednikov

parent
15a42f1f35
commit
decdd8be9f
@@ -210,6 +210,11 @@ fn main() {
|
||||
}
|
||||
|
||||
fn (v mut V) compile() {
|
||||
// Emily: Stop people on linux from being able to build with msvc
|
||||
if os.user_os() != 'windows' && v.os == .msvc {
|
||||
panic('Cannot build with msvc on ${os.user_os()}')
|
||||
}
|
||||
|
||||
mut cgen := v.cgen
|
||||
cgen.genln('// Generated by V')
|
||||
v.add_v_files_to_compile()
|
||||
@@ -753,7 +758,8 @@ fn (v mut V) cc() {
|
||||
v.cc_msvc()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linux_host := os.user_os() == 'linux'
|
||||
v.log('cc() isprod=$v.pref.is_prod outname=$v.out_name')
|
||||
mut a := [v.pref.cflags, '-std=gnu11', '-w'] // arguments for the C compiler
|
||||
|
Reference in New Issue
Block a user