compiler/msvc: support paths with hyphen

pull/1870/head
Joe Conigliaro 2019-09-05 09:57:29 +10:00 committed by Alexander Medvednikov
parent cc5470d068
commit 96e959342a
1 changed files with 4 additions and 0 deletions

View File

@ -330,6 +330,10 @@ pub fn (v mut V) cc_msvc() {
// Which ever one of these is lowest we use // Which ever one of these is lowest we use
// TODO: we really shouldnt support all of these cmon // TODO: we really shouldnt support all of these cmon
mut lowest := base.index('-') mut lowest := base.index('-')
// dont break paths with hyphens
if lowest != 0 {
lowest = -1
}
for x in [base.index(' '), base.index(',')] { for x in [base.index(' '), base.index(',')] {
if (x < lowest && x != -1) || lowest == -1 { if (x < lowest && x != -1) || lowest == -1 {
lowest = x lowest = x