blob: 958fd7741669d8279ef77638613557331bd2c6ae [file] [log] [blame]
Ulrich Weigand8afad612014-07-28 13:17:52 +00001// Check passing PowerPC ABI options to the backend.
2
3// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
4// RUN: | FileCheck -check-prefix=CHECK-ELFv1 %s
5// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
6// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
7// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
Hal Finkel0d0a1a52015-03-11 19:14:15 +00008// RUN: -mabi=elfv1-qpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
9// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
10// RUN: -mcpu=a2q | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
11// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
12// RUN: -mcpu=a2 -mqpx | FileCheck -check-prefix=CHECK-ELFv1-QPX %s
13// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
14// RUN: -mcpu=a2q -mno-qpx | FileCheck -check-prefix=CHECK-ELFv1 %s
15// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 \
Ulrich Weigand8afad612014-07-28 13:17:52 +000016// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
17
18// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
19// RUN: | FileCheck -check-prefix=CHECK-ELFv2 %s
20// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
21// RUN: -mabi=elfv1 | FileCheck -check-prefix=CHECK-ELFv1 %s
22// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
23// RUN: -mabi=elfv2 | FileCheck -check-prefix=CHECK-ELFv2 %s
Eric Christopher71e5e3d2015-07-10 18:25:54 +000024// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 \
25// RUN: -mabi=altivec | FileCheck -check-prefix=CHECK-ELFv2 %s
Ulrich Weigand8afad612014-07-28 13:17:52 +000026
27// CHECK-ELFv1: "-target-abi" "elfv1"
Hal Finkel0d0a1a52015-03-11 19:14:15 +000028// CHECK-ELFv1-QPX: "-target-abi" "elfv1-qpx"
Ulrich Weigand8afad612014-07-28 13:17:52 +000029// CHECK-ELFv2: "-target-abi" "elfv2"
30