compiler: move msvc compiler to -cc flag instead of -os (#2338)

* move msvc to -cc flag instead of -os

* undo unrelated change

* do first build without msvc

* remvove flags temp

* fix comment
This commit is contained in:
joe-conigliaro 2019-10-14 16:41:46 +11:00 committed by GitHub
parent 093d8a2b00
commit 9a2b8a0814
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 37 additions and 36 deletions

View file

@ -75,7 +75,7 @@ fn (p mut Parser) gen_var_decl(name string, is_static bool) string {
}
fn (p mut Parser) gen_fn_decl(f Fn, typ, str_args string) {
dll_export_linkage := if p.os == .msvc && p.attr == 'live' && p.pref.is_so {
dll_export_linkage := if p.pref.ccompiler == 'msvc' && p.attr == 'live' && p.pref.is_so {
'__declspec(dllexport) '
} else if p.attr == 'inline' {
'static inline '