1 // General tests that as(1) invocations on AIX targets are sane. Note that we
2 // only test assembler functionalities in this suite.
4 // Check powerpc-ibm-aix7.1.0.0, system assembler is used for assembly files, 32-bit.
5 // RUN: %clang -x assembler %s -### -c -fintegrated-as 2>&1 \
6 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
7 // RUN: | FileCheck --check-prefix=CHECK-AS32 %s
9 // RUN: %clang -x assembler %s -### -c 2>&1 -fno-integrated-as \
10 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
11 // RUN: | FileCheck --check-prefix=CHECK-AS32 %s
13 // Check powerpc-ibm-aix7.1.0.0, 32-bit.
14 // RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
15 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
16 // RUN: | FileCheck --check-prefixes=CHECK-AS32,CHECK-AS32-CC1 %s
17 // CHECK-AS32-NOT: warning:
18 // CHECK-AS32-CC1: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
19 // CHECK-AS32: "{{.*}}as{{(.exe)?}}"
21 // CHECK-AS32: "-many"
23 // Check powerpc64-ibm-aix7.1.0.0, system assembler is used for assembly files, 64-bit.
24 // RUN: %clang -x assembler %s -### -c -fintegrated-as 2>&1 \
25 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
26 // RUN: | FileCheck --check-prefix=CHECK-AS64 %s
28 // RUN: %clang -x assembler %s -### -c -fno-integrated-as 2>&1 \
29 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
30 // RUN: | FileCheck --check-prefix=CHECK-AS64 %s
32 // Check powerpc64-ibm-aix7.1.0.0, 64-bit.
33 // RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
34 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
35 // RUN: | FileCheck --check-prefixes=CHECK-AS64,CHECK-AS64-CC1 %s
36 // CHECK-AS64-NOT: warning:
37 // CHECK-AS64-CC1: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
38 // CHECK-AS64: "{{.*}}as{{(.exe)?}}"
40 // CHECK-AS64: "-many"
42 // Check powerpc-ibm-aix7.1.0.0, 32-bit. -Xassembler <arg> option.
43 // RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
44 // RUN: -Xassembler -w \
45 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
46 // RUN: | FileCheck --check-prefix=CHECK-AS32-Xassembler %s
47 // CHECK-AS32-Xassembler-NOT: warning:
48 // CHECK-AS32-Xassembler: "-cc1" "-triple" "powerpc-ibm-aix7.1.0.0"
49 // CHECK-AS32-Xassembler: "{{.*}}as{{(.exe)?}}"
50 // CHECK-AS32-Xassembler: "-a32"
51 // CHECK-AS32-Xassembler: "-many"
52 // CHECK-AS32-Xassembler: "-w"
54 // Check powerpc64-ibm-aix7.1.0.0, 64-bit. -Wa,<arg>,<arg> option.
55 // RUN: %clang %s -### -c -fno-integrated-as 2>&1 \
57 // RUN: --target=powerpc64-ibm-aix7.1.0.0 \
58 // RUN: | FileCheck --check-prefix=CHECK-AS64-Wa %s
59 // CHECK-AS64-Wa-NOT: warning:
60 // CHECK-AS64-Wa: "-cc1" "-triple" "powerpc64-ibm-aix7.1.0.0"
61 // CHECK-AS64-Wa: "{{.*}}as{{(.exe)?}}"
62 // CHECK-AS64-Wa: "-a64"
63 // CHECK-AS64-Wa: "-many"
64 // CHECK-AS64-Wa: "-v"
65 // CHECK-AS64-Wa: "-w"
67 // Check powerpc-ibm-aix7.1.0.0, 32-bit. Multiple input files.
68 // RUN: %clang -### -fno-integrated-as -c \
69 // RUN: %S/Inputs/aix_ppc_tree/dummy0.s \
70 // RUN: %S/Inputs/aix_ppc_tree/dummy1.s \
71 // RUN: %S/Inputs/aix_ppc_tree/dummy2.s 2>&1 \
72 // RUN: --target=powerpc-ibm-aix7.1.0.0 \
73 // RUN: | FileCheck --check-prefix=CHECK-AS32-MultiInput %s
74 // CHECK-AS32-MultiInput-NOT: warning:
75 // CHECK-AS32-MultiInput: "{{.*}}as{{(.exe)?}}"
76 // CHECK-AS32-MultiInput: "-a32"
77 // CHECK-AS32-MultiInput: "-many"
78 // CHECK-AS32-MultiInput: "{{.*}}as{{(.exe)?}}"
79 // CHECK-AS32-MultiInput: "-a32"
80 // CHECK-AS32-MultiInput: "-many"
81 // CHECK-AS32-MultiInput: "{{.*}}as{{(.exe)?}}"
82 // CHECK-AS32-MultiInput: "-a32"
83 // CHECK-AS32-MultiInput: "-many"
85 // Check not passing no-integrated-as flag by default.
86 // RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 \
87 // RUN: | FileCheck --check-prefix=CHECK-IAS --implicit-check-not=-no-integrated-as %s
88 // CHECK-IAS-NOT: "-a64"
89 // CHECK-IAS: InstalledDir
91 // Check passing no-integrated-as flag if specified by user.
92 // RUN: %clang %s -### -c 2>&1 --target=powerpc64-ibm-aix7.1.0.0 -fno-integrated-as \
93 // RUN: | FileCheck --check-prefix=CHECK-NOIAS %s
94 // CHECK-NOIAS: InstalledDir
95 // CHECK-NOIAS: -no-integrated-as
96 // CHECK-NOIAS: "-a64"