1f4a2713aSLionel Sambuc // Don't attempt slash switches on msys bash. 2f4a2713aSLionel Sambuc // REQUIRES: shell-preserves-root 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc // Note: %s must be preceded by --, otherwise it may be interpreted as a 5f4a2713aSLionel Sambuc // command-line option, e.g. on Mac where %s is commonly under /Users. 6f4a2713aSLionel Sambuc 7f4a2713aSLionel Sambuc // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULT %s 8f4a2713aSLionel Sambuc // DEFAULT: "-o" "cl-outputs.obj" 9f4a2713aSLionel Sambuc 10*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Fo -### -- %s 2>&1 | FileCheck -check-prefix=FoEMPTY %s 11*0a6a1f1dSLionel Sambuc // FoEMPTY: "-o" "cl-outputs.obj" 12*0a6a1f1dSLionel Sambuc 13f4a2713aSLionel Sambuc // RUN: %clang_cl /Foa -### -- %s 2>&1 | FileCheck -check-prefix=FoNAME %s 14f4a2713aSLionel Sambuc // FoNAME: "-o" "a.obj" 15f4a2713aSLionel Sambuc 16f4a2713aSLionel Sambuc // RUN: %clang_cl /Foa.ext /Fob.ext -### -- %s 2>&1 | FileCheck -check-prefix=FoNAMEEXT %s 17f4a2713aSLionel Sambuc // FoNAMEEXT: "-o" "b.ext" 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambuc // RUN: %clang_cl /Fofoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FoDIR %s 20f4a2713aSLionel Sambuc // FoDIR: "-o" "foo.dir{{[/\\]+}}cl-outputs.obj" 21f4a2713aSLionel Sambuc 22f4a2713aSLionel Sambuc // RUN: %clang_cl /Fofoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FoDIRNAME %s 23f4a2713aSLionel Sambuc // FoDIRNAME: "-o" "foo.dir{{[/\\]+}}a.obj" 24f4a2713aSLionel Sambuc 25f4a2713aSLionel Sambuc // RUN: %clang_cl /Fofoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FoDIRNAMEEXT %s 26f4a2713aSLionel Sambuc // FoDIRNAMEEXT: "-o" "foo.dir{{[/\\]+}}a.ext" 27f4a2713aSLionel Sambuc 28f4a2713aSLionel Sambuc // RUN: %clang_cl /Fo.. -### -- %s 2>&1 | FileCheck -check-prefix=FoCRAZY %s 29f4a2713aSLionel Sambuc // FoCRAZY: "-o" "..obj" 30f4a2713aSLionel Sambuc 31f4a2713aSLionel Sambuc // RUN: %clang_cl /Foa.obj -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEERROR %s 32f4a2713aSLionel Sambuc // CHECK-MULTIPLESOURCEERROR: error: cannot specify '/Foa.obj' when compiling multiple source files 33f4a2713aSLionel Sambuc 34f4a2713aSLionel Sambuc // RUN: %clang_cl /Fomydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEOK %s 35f4a2713aSLionel Sambuc // CHECK-MULTIPLESOURCEOK: "-o" "mydir{{[/\\]+}}cl-outputs.obj" 36f4a2713aSLionel Sambuc 37*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Fo -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEOK2 %s 38*0a6a1f1dSLionel Sambuc // CHECK-MULTIPLESOURCEOK2: "-o" "cl-outputs.obj" 39*0a6a1f1dSLionel Sambuc // CHECK-MULTIPLESOURCEOK2: "-o" "cl-outputs.obj" 40*0a6a1f1dSLionel Sambuc 41*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /oa -### -- %s 2>&1 | FileCheck -check-prefix=oNAME1 %s 42*0a6a1f1dSLionel Sambuc // oNAME1: "-o" "a.obj" 43*0a6a1f1dSLionel Sambuc 44*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o a -### -- %s 2>&1 | FileCheck -check-prefix=oNAME2 %s 45*0a6a1f1dSLionel Sambuc // oNAME2: "-o" "a.obj" 46*0a6a1f1dSLionel Sambuc 47*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /oa.ext /ob.ext -### -- %s 2>&1 | FileCheck -check-prefix=oNAMEEXT1 %s 48*0a6a1f1dSLionel Sambuc // oNAMEEXT1: "-o" "b.ext" 49*0a6a1f1dSLionel Sambuc 50*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o a.ext /ob.ext -### -- %s 2>&1 | FileCheck -check-prefix=oNAMEEXT2 %s 51*0a6a1f1dSLionel Sambuc // oNAMEEXT2: "-o" "b.ext" 52*0a6a1f1dSLionel Sambuc 53*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /ofoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=oDIR1 %s 54*0a6a1f1dSLionel Sambuc // oDIR1: "-o" "foo.dir{{[/\\]+}}cl-outputs.obj" 55*0a6a1f1dSLionel Sambuc 56*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o foo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=oDIR2 %s 57*0a6a1f1dSLionel Sambuc // oDIR2: "-o" "foo.dir{{[/\\]+}}cl-outputs.obj" 58*0a6a1f1dSLionel Sambuc 59*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /ofoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=oDIRNAME1 %s 60*0a6a1f1dSLionel Sambuc // oDIRNAME1: "-o" "foo.dir{{[/\\]+}}a.obj" 61*0a6a1f1dSLionel Sambuc 62*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o foo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=oDIRNAME2 %s 63*0a6a1f1dSLionel Sambuc // oDIRNAME2: "-o" "foo.dir{{[/\\]+}}a.obj" 64*0a6a1f1dSLionel Sambuc 65*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /ofoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=oDIRNAMEEXT1 %s 66*0a6a1f1dSLionel Sambuc // oDIRNAMEEXT1: "-o" "foo.dir{{[/\\]+}}a.ext" 67*0a6a1f1dSLionel Sambuc 68*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o foo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=oDIRNAMEEXT2 %s 69*0a6a1f1dSLionel Sambuc // oDIRNAMEEXT2: "-o" "foo.dir{{[/\\]+}}a.ext" 70*0a6a1f1dSLionel Sambuc 71*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o.. -### -- %s 2>&1 | FileCheck -check-prefix=oCRAZY1 %s 72*0a6a1f1dSLionel Sambuc // oCRAZY1: "-o" "..obj" 73*0a6a1f1dSLionel Sambuc 74*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o .. -### -- %s 2>&1 | FileCheck -check-prefix=oCRAZY2 %s 75*0a6a1f1dSLionel Sambuc // oCRAZY2: "-o" "..obj" 76*0a6a1f1dSLionel Sambuc 77*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c %s -### /o 2>&1 | FileCheck -check-prefix=oMISSINGARG %s 78*0a6a1f1dSLionel Sambuc // oMISSINGARG: error: argument to '/o' is missing (expected 1 value) 79*0a6a1f1dSLionel Sambuc 80*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /omydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-oMULTIPLESOURCEOK1 %s 81*0a6a1f1dSLionel Sambuc // CHECK-oMULTIPLESOURCEOK1: "-o" "mydir{{[/\\]+}}cl-outputs.obj" 82*0a6a1f1dSLionel Sambuc 83*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /o mydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-oMULTIPLESOURCEOK2 %s 84*0a6a1f1dSLionel Sambuc // CHECK-oMULTIPLESOURCEOK2: "-o" "mydir{{[/\\]+}}cl-outputs.obj" 85*0a6a1f1dSLionel Sambuc 86*0a6a1f1dSLionel Sambuc 87*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /obar /Fofoo -### -- %s 2>&1 | FileCheck -check-prefix=FooRACE1 %s 88*0a6a1f1dSLionel Sambuc // FooRACE1: "-o" "foo.obj" 89*0a6a1f1dSLionel Sambuc 90*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /c /Fofoo /obar -### -- %s 2>&1 | FileCheck -check-prefix=FooRACE2 %s 91*0a6a1f1dSLionel Sambuc // FooRACE2: "-o" "bar.obj" 92*0a6a1f1dSLionel Sambuc 93f4a2713aSLionel Sambuc 94f4a2713aSLionel Sambuc // RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTEXE %s 95f4a2713aSLionel Sambuc // DEFAULTEXE: cl-outputs.exe 96f4a2713aSLionel Sambuc 97f4a2713aSLionel Sambuc // RUN: %clang_cl /LD -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTDLL %s 98f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTDLL %s 99f4a2713aSLionel Sambuc // DEFAULTDLL: "-out:cl-outputs.dll" 100f4a2713aSLionel Sambuc // DEFAULTDLL: "-implib:cl-outputs.lib" 101f4a2713aSLionel Sambuc 102f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo -### -- %s 2>&1 | FileCheck -check-prefix=FeNOEXT %s 103f4a2713aSLionel Sambuc // FeNOEXT: "-out:foo.exe" 104f4a2713aSLionel Sambuc 105*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Fe -### -- %s 2>&1 | FileCheck -check-prefix=FeEMPTY %s 106*0a6a1f1dSLionel Sambuc // FeEMPTY-NOT: argument to '/Fe' is missing 107*0a6a1f1dSLionel Sambuc // FeEMPTY: "-out:cl-outputs.exe" 108*0a6a1f1dSLionel Sambuc 109f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo /LD -### -- %s 2>&1 | FileCheck -check-prefix=FeNOEXTDLL %s 110f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo /LDd -### -- %s 2>&1 | FileCheck -check-prefix=FeNOEXTDLL %s 111f4a2713aSLionel Sambuc // FeNOEXTDLL: "-out:foo.dll" 112f4a2713aSLionel Sambuc // FeNOEXTDLL: "-implib:foo.lib" 113f4a2713aSLionel Sambuc 114f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeEXT %s 115f4a2713aSLionel Sambuc // FeEXT: "-out:foo.ext" 116f4a2713aSLionel Sambuc 117f4a2713aSLionel Sambuc // RUN: %clang_cl /LD /Fefoo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeEXTDLL %s 118f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd /Fefoo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeEXTDLL %s 119f4a2713aSLionel Sambuc // FeEXTDLL: "-out:foo.ext" 120f4a2713aSLionel Sambuc // FeEXTDLL: "-implib:foo.lib" 121f4a2713aSLionel Sambuc 122f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeDIR %s 123f4a2713aSLionel Sambuc // FeDIR: "-out:foo.dir{{[/\\]+}}cl-outputs.exe" 124f4a2713aSLionel Sambuc 125f4a2713aSLionel Sambuc // RUN: %clang_cl /LD /Fefoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRDLL %s 126f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd /Fefoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRDLL %s 127f4a2713aSLionel Sambuc // FeDIRDLL: "-out:foo.dir{{[/\\]+}}cl-outputs.dll" 128f4a2713aSLionel Sambuc // FeDIRDLL: "-implib:foo.dir{{[/\\]+}}cl-outputs.lib" 129f4a2713aSLionel Sambuc 130f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAME %s 131f4a2713aSLionel Sambuc // FeDIRNAME: "-out:foo.dir{{[/\\]+}}a.exe" 132f4a2713aSLionel Sambuc 133f4a2713aSLionel Sambuc // RUN: %clang_cl /LD /Fefoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAMEDLL %s 134f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd /Fefoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAMEDLL %s 135f4a2713aSLionel Sambuc // FeDIRNAMEDLL: "-out:foo.dir{{[/\\]+}}a.dll" 136f4a2713aSLionel Sambuc // FeDIRNAMEDLL: "-implib:foo.dir{{[/\\]+}}a.lib" 137f4a2713aSLionel Sambuc 138f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAMEEXT %s 139f4a2713aSLionel Sambuc // FeDIRNAMEEXT: "-out:foo.dir{{[/\\]+}}a.ext" 140f4a2713aSLionel Sambuc 141f4a2713aSLionel Sambuc // RUN: %clang_cl /LD /Fefoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAMEEXTDLL %s 142f4a2713aSLionel Sambuc // RUN: %clang_cl /LDd /Fefoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeDIRNAMEEXTDLL %s 143f4a2713aSLionel Sambuc // FeDIRNAMEEXTDLL: "-out:foo.dir{{[/\\]+}}a.ext" 144f4a2713aSLionel Sambuc // FeDIRNAMEEXTDLL: "-implib:foo.dir{{[/\\]+}}a.lib" 145f4a2713aSLionel Sambuc 146f4a2713aSLionel Sambuc // RUN: %clang_cl /Fefoo /Febar -### -- %s 2>&1 | FileCheck -check-prefix=FeOVERRIDE %s 147f4a2713aSLionel Sambuc // FeOVERRIDE: "-out:bar.exe" 148f4a2713aSLionel Sambuc 149f4a2713aSLionel Sambuc 150*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /obar /Fefoo -### -- %s 2>&1 | FileCheck -check-prefix=FeoRACE1 %s 151*0a6a1f1dSLionel Sambuc // FeoRACE1: "-out:foo.exe" 152*0a6a1f1dSLionel Sambuc 153*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Fefoo /obar -### -- %s 2>&1 | FileCheck -check-prefix=FeoRACE2 %s 154*0a6a1f1dSLionel Sambuc // FeoRACE2: "-out:bar.exe" 155*0a6a1f1dSLionel Sambuc 156*0a6a1f1dSLionel Sambuc 157*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo -### -- %s 2>&1 | FileCheck -check-prefix=FeoNOEXT1 %s 158*0a6a1f1dSLionel Sambuc // FeoNOEXT1: "-out:foo.exe" 159*0a6a1f1dSLionel Sambuc 160*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo -### -- %s 2>&1 | FileCheck -check-prefix=FeoNOEXT2 %s 161*0a6a1f1dSLionel Sambuc // FeoNOEXT2: "-out:foo.exe" 162*0a6a1f1dSLionel Sambuc 163*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo /LD -### -- %s 2>&1 | FileCheck -check-prefix=FeoNOEXTDLL %s 164*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo /LDd -### -- %s 2>&1 | FileCheck -check-prefix=FeoNOEXTDLL %s 165*0a6a1f1dSLionel Sambuc // FeoNOEXTDLL: "-out:foo.dll" 166*0a6a1f1dSLionel Sambuc // FeoNOEXTDLL: "-implib:foo.lib" 167*0a6a1f1dSLionel Sambuc 168*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoEXT1 %s 169*0a6a1f1dSLionel Sambuc // FeoEXT1: "-out:foo.ext" 170*0a6a1f1dSLionel Sambuc 171*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoEXT2 %s 172*0a6a1f1dSLionel Sambuc // FeoEXT2: "-out:foo.ext" 173*0a6a1f1dSLionel Sambuc 174*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LD /o foo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoEXTDLL %s 175*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LDd /ofoo.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoEXTDLL %s 176*0a6a1f1dSLionel Sambuc // FeoEXTDLL: "-out:foo.ext" 177*0a6a1f1dSLionel Sambuc // FeoEXTDLL: "-implib:foo.lib" 178*0a6a1f1dSLionel Sambuc 179*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIR1 %s 180*0a6a1f1dSLionel Sambuc // FeoDIR1: "-out:foo.dir{{[/\\]+}}cl-outputs.exe" 181*0a6a1f1dSLionel Sambuc 182*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIR2 %s 183*0a6a1f1dSLionel Sambuc // FeoDIR2: "-out:foo.dir{{[/\\]+}}cl-outputs.exe" 184*0a6a1f1dSLionel Sambuc 185*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LD /o foo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRDLL %s 186*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LDd /ofoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRDLL %s 187*0a6a1f1dSLionel Sambuc // FeoDIRDLL: "-out:foo.dir{{[/\\]+}}cl-outputs.dll" 188*0a6a1f1dSLionel Sambuc // FeoDIRDLL: "-implib:foo.dir{{[/\\]+}}cl-outputs.lib" 189*0a6a1f1dSLionel Sambuc 190*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAME1 %s 191*0a6a1f1dSLionel Sambuc // FeoDIRNAME1: "-out:foo.dir{{[/\\]+}}a.exe" 192*0a6a1f1dSLionel Sambuc 193*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAME2 %s 194*0a6a1f1dSLionel Sambuc // FeoDIRNAME2: "-out:foo.dir{{[/\\]+}}a.exe" 195*0a6a1f1dSLionel Sambuc 196*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LD /o foo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEDLL %s 197*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LDd /ofoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEDLL %s 198*0a6a1f1dSLionel Sambuc // FeoDIRNAMEDLL: "-out:foo.dir{{[/\\]+}}a.dll" 199*0a6a1f1dSLionel Sambuc // FeoDIRNAMEDLL: "-implib:foo.dir{{[/\\]+}}a.lib" 200*0a6a1f1dSLionel Sambuc 201*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEEXT1 %s 202*0a6a1f1dSLionel Sambuc // FeoDIRNAMEEXT1: "-out:foo.dir{{[/\\]+}}a.ext" 203*0a6a1f1dSLionel Sambuc 204*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /o foo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEEXT2 %s 205*0a6a1f1dSLionel Sambuc // FeoDIRNAMEEXT2: "-out:foo.dir{{[/\\]+}}a.ext" 206*0a6a1f1dSLionel Sambuc 207*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LD /o foo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEEXTDLL %s 208*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /LDd /ofoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FeoDIRNAMEEXTDLL %s 209*0a6a1f1dSLionel Sambuc // FeoDIRNAMEEXTDLL: "-out:foo.dir{{[/\\]+}}a.ext" 210*0a6a1f1dSLionel Sambuc // FeoDIRNAMEEXTDLL: "-implib:foo.dir{{[/\\]+}}a.lib" 211*0a6a1f1dSLionel Sambuc 212*0a6a1f1dSLionel Sambuc // RUN: %clang_cl -### /o 2>&1 | FileCheck -check-prefix=FeoMISSINGARG %s 213*0a6a1f1dSLionel Sambuc // FeoMISSINGARG: error: argument to '/o' is missing (expected 1 value) 214*0a6a1f1dSLionel Sambuc 215*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /ofoo /o bar -### -- %s 2>&1 | FileCheck -check-prefix=FeoOVERRIDE %s 216*0a6a1f1dSLionel Sambuc // FeoOVERRIDE: "-out:bar.exe" 217*0a6a1f1dSLionel Sambuc 218*0a6a1f1dSLionel Sambuc 219f4a2713aSLionel Sambuc // RUN: %clang_cl /FA -### -- %s 2>&1 | FileCheck -check-prefix=FA %s 220f4a2713aSLionel Sambuc // FA: "-o" "cl-outputs.asm" 221*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /FA /Fa -### -- %s 2>&1 | FileCheck -check-prefix=FaEMPTY %s 222*0a6a1f1dSLionel Sambuc // FaEMPTY: "-o" "cl-outputs.asm" 223f4a2713aSLionel Sambuc // RUN: %clang_cl /FA /Fafoo -### -- %s 2>&1 | FileCheck -check-prefix=FaNAME %s 224f4a2713aSLionel Sambuc // RUN: %clang_cl /Fafoo -### -- %s 2>&1 | FileCheck -check-prefix=FaNAME %s 225f4a2713aSLionel Sambuc // FaNAME: "-o" "foo.asm" 226f4a2713aSLionel Sambuc // RUN: %clang_cl /FA /Faa.ext /Fab.ext -### -- %s 2>&1 | FileCheck -check-prefix=FaNAMEEXT %s 227f4a2713aSLionel Sambuc // FaNAMEEXT: "-o" "b.ext" 228f4a2713aSLionel Sambuc // RUN: %clang_cl /FA /Fafoo.dir/ -### -- %s 2>&1 | FileCheck -check-prefix=FaDIR %s 229f4a2713aSLionel Sambuc // FaDIR: "-o" "foo.dir{{[/\\]+}}cl-outputs.asm" 230f4a2713aSLionel Sambuc // RUN: %clang_cl /FA /Fafoo.dir/a -### -- %s 2>&1 | FileCheck -check-prefix=FaDIRNAME %s 231f4a2713aSLionel Sambuc // FaDIRNAME: "-o" "foo.dir{{[/\\]+}}a.asm" 232f4a2713aSLionel Sambuc // RUN: %clang_cl /FA /Fafoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FaDIRNAMEEXT %s 233f4a2713aSLionel Sambuc // FaDIRNAMEEXT: "-o" "foo.dir{{[/\\]+}}a.ext" 234f4a2713aSLionel Sambuc // RUN: %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCE %s 235f4a2713aSLionel Sambuc // FaMULTIPLESOURCE: error: cannot specify '/Faa.asm' when compiling multiple source files 236*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /Fa -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCEOK %s 237*0a6a1f1dSLionel Sambuc // FaMULTIPLESOURCEOK: "-o" "cl-outputs.asm" 238*0a6a1f1dSLionel Sambuc // FaMULTIPLESOURCEOK: "-o" "cl-outputs.asm" 239*0a6a1f1dSLionel Sambuc 240*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P -### -- %s 2>&1 | FileCheck -check-prefix=P %s 241*0a6a1f1dSLionel Sambuc // P: "-E" 242*0a6a1f1dSLionel Sambuc // P: "-o" "cl-outputs.i" 243*0a6a1f1dSLionel Sambuc 244*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /Fifoo -### -- %s 2>&1 | FileCheck -check-prefix=Fi1 %s 245*0a6a1f1dSLionel Sambuc // Fi1: "-E" 246*0a6a1f1dSLionel Sambuc // Fi1: "-o" "foo.i" 247*0a6a1f1dSLionel Sambuc 248*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /Fifoo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fi2 %s 249*0a6a1f1dSLionel Sambuc // Fi2: "-E" 250*0a6a1f1dSLionel Sambuc // Fi2: "-o" "foo.x" 251*0a6a1f1dSLionel Sambuc 252*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /ofoo -### -- %s 2>&1 | FileCheck -check-prefix=Fio1 %s 253*0a6a1f1dSLionel Sambuc // Fio1: "-E" 254*0a6a1f1dSLionel Sambuc // Fio1: "-o" "foo.i" 255*0a6a1f1dSLionel Sambuc 256*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /o foo -### -- %s 2>&1 | FileCheck -check-prefix=Fio2 %s 257*0a6a1f1dSLionel Sambuc // Fio2: "-E" 258*0a6a1f1dSLionel Sambuc // Fio2: "-o" "foo.i" 259*0a6a1f1dSLionel Sambuc 260*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /ofoo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fio3 %s 261*0a6a1f1dSLionel Sambuc // Fio3: "-E" 262*0a6a1f1dSLionel Sambuc // Fio3: "-o" "foo.x" 263*0a6a1f1dSLionel Sambuc 264*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /o foo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fio4 %s 265*0a6a1f1dSLionel Sambuc // Fio4: "-E" 266*0a6a1f1dSLionel Sambuc // Fio4: "-o" "foo.x" 267*0a6a1f1dSLionel Sambuc 268*0a6a1f1dSLionel Sambuc 269*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /obar.x /Fifoo.x -### -- %s 2>&1 | FileCheck -check-prefix=FioRACE1 %s 270*0a6a1f1dSLionel Sambuc // FioRACE1: "-E" 271*0a6a1f1dSLionel Sambuc // FioRACE1: "-o" "foo.x" 272*0a6a1f1dSLionel Sambuc 273*0a6a1f1dSLionel Sambuc // RUN: %clang_cl /P /Fifoo.x /obar.x -### -- %s 2>&1 | FileCheck -check-prefix=FioRACE2 %s 274*0a6a1f1dSLionel Sambuc // FioRACE2: "-E" 275*0a6a1f1dSLionel Sambuc // FioRACE2: "-o" "bar.x" 276