xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/save-temps.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1f4a2713aSLionel Sambuc // RUN: %clang -target x86_64-apple-darwin -save-temps -arch x86_64 %s -### 2>&1 \
2f4a2713aSLionel Sambuc // RUN:   | FileCheck %s
3f4a2713aSLionel Sambuc // CHECK: "-o" "save-temps.i"
4*0a6a1f1dSLionel Sambuc // CHECK: "-disable-llvm-optzns"
5*0a6a1f1dSLionel Sambuc // CHECK: "-o" "save-temps.bc"
6f4a2713aSLionel Sambuc // CHECK: "-o" "save-temps.s"
7f4a2713aSLionel Sambuc // CHECK: "-o" "save-temps.o"
8f4a2713aSLionel Sambuc // CHECK: "-o" "a.out"
9f4a2713aSLionel Sambuc 
10*0a6a1f1dSLionel Sambuc // Check for a single clang cc1 invocation when NOT using -save-temps.
11*0a6a1f1dSLionel Sambuc // RUN: %clang -target x86_64-apple-darwin -arch x86_64 -S %s -### 2>&1 \
12*0a6a1f1dSLionel Sambuc // RUN:   | FileCheck %s -check-prefix=NO-TEMPS
13*0a6a1f1dSLionel Sambuc // NO-TEMPS: "-cc1"
14*0a6a1f1dSLionel Sambuc // NO-TEMPS: "-S"
15*0a6a1f1dSLionel Sambuc // NO-TEMPS: "-x" "c"
16*0a6a1f1dSLionel Sambuc 
17f4a2713aSLionel Sambuc // RUN: %clang -target x86_64-apple-darwin -save-temps -arch i386 -arch x86_64 %s -### 2>&1 \
18f4a2713aSLionel Sambuc // RUN:   | FileCheck %s -check-prefix=MULT-ARCH
19f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-i386.i"
20*0a6a1f1dSLionel Sambuc // MULT-ARCH: "-o" "save-temps-i386.bc"
21f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-i386.s"
22f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-i386.o"
23f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "a.out-i386"
24f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-x86_64.i"
25*0a6a1f1dSLionel Sambuc // MULT-ARCH: "-o" "save-temps-x86_64.bc"
26f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-x86_64.s"
27f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "save-temps-x86_64.o"
28f4a2713aSLionel Sambuc // MULT-ARCH: "-o" "a.out-x86_64"
29f4a2713aSLionel Sambuc // MULT-ARCH: lipo
30f4a2713aSLionel Sambuc // MULT-ARCH: "-create" "-output" "a.out" "a.out-i386" "a.out-x86_64"
31