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

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
12 changed files with 37 additions and 36 deletions

View File

@ -26,7 +26,7 @@ fn (v &V) get_os_cflags() []CFlag {
|| (flag.os == 'linux' && v.os == .linux)
|| (flag.os == 'darwin' && v.os == .mac)
|| (flag.os == 'freebsd' && v.os == .freebsd)
|| (flag.os == 'windows' && (v.os == .windows || v.os == .msvc)) {
|| (flag.os == 'windows' && v.os == .windows) {
flags << flag
}
}
@ -140,10 +140,10 @@ fn (table mut Table) parse_cflag(cflag string, mod string) {
}
//TODO: implement msvc specific c_options_before_target and c_options_after_target ...
fn (cflags []CFlag) c_options_before_target_msvc() string { return '' }
fn (cflags []CFlag) c_options_after_target_msvc() string { return '' }
fn (cflags []CFlag) c_options_before_target() string {
$if msvc {
return ''
}
// -I flags, optimization flags and so on
mut args:=[]string
for flag in cflags {
@ -155,9 +155,6 @@ fn (cflags []CFlag) c_options_before_target() string {
}
fn (cflags []CFlag) c_options_after_target() string {
$if msvc {
return ''
}
// -l flags (libs)
mut args:=[]string
for flag in cflags {