Home | History | Annotate | Download | only in Driver
      1 // Don't attempt slash switches on msys bash.
      2 // REQUIRES: shell-preserves-root
      3 
      4 // Note: %s must be preceded by --, otherwise it may be interpreted as a
      5 // command-line option, e.g. on Mac where %s is commonly under /Users.
      6 
      7 // RUN: %clang_cl /Foa -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-NAME %s
      8 // CHECK-NAME:  "-o" "a.obj"
      9 
     10 // RUN: %clang_cl /Foa.ext /Fob.ext -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-NAMEEXT %s
     11 // CHECK-NAMEEXT:  warning: overriding '/Foa.ext' option with '/Fob.ext'
     12 // CHECK-NAMEEXT:  "-o" "b.ext"
     13 
     14 // RUN: %clang_cl /Fofoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-DIR %s
     15 // CHECK-DIR:  "-o" "foo.dir{{[/\\]+}}cl-Fo.obj"
     16 
     17 // RUN: %clang_cl /Fofoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-DIRNAME %s
     18 // CHECK-DIRNAME:  "-o" "foo.dir{{[/\\]+}}a.obj"
     19 
     20 // RUN: %clang_cl /Fofoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-DIRNAMEEXT %s
     21 // CHECK-DIRNAMEEXT:  "-o" "foo.dir{{[/\\]+}}a.ext"
     22 
     23 // RUN: %clang_cl /Fo.. -### -- %s 2>&1 | FileCheck -check-prefix=CHECK-CRAZY %s
     24 // CHECK-CRAZY:  "-o" "...obj"
     25 
     26 
     27 // RUN: %clang_cl /Fo -### 2>&1 | FileCheck -check-prefix=CHECK-MISSINGARG %s
     28 // CHECK-MISSINGARG: error: argument to '/Fo' is missing (expected 1 value)
     29 
     30 // RUN: %clang_cl /Foa.obj -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEERROR %s
     31 // CHECK-MULTIPLESOURCEERROR: error: cannot specify '/Foa.obj' when compiling multiple source files
     32 
     33 // RUN: %clang_cl /Fomydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEOK %s
     34 // CHECK-MULTIPLESOURCEOK: "-o" "mydir{{[/\\]+}}cl-Fo.obj"
     35