1 // RUN: %clang -### --target=powerpc-ibm-aix-xcoff -mxcoff-roptr %s 2>&1 | \
2 // RUN: FileCheck %s --check-prefixes=ROPTR,LINK
3 // RUN: %clang -### --target=powerpc-ibm-aix-xcoff -c -mxcoff-roptr %s 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=ROPTR
5 // RUN: %clang -### --target=powerpc-ibm-aix-xcoff -mxcoff-roptr -mno-xcoff-roptr %s 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=NO_ROPTR
8 // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr %s 2>&1 | \
9 // RUN: FileCheck %s --check-prefixes=ROPTR,LINK
10 // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -S -mxcoff-roptr %s 2>&1 | \
11 // RUN: FileCheck %s --check-prefix=ROPTR
12 // RUN: %clang -### --target=powerpc-ibm-aix-xcoff %s 2>&1 | \
13 // RUN: FileCheck %s --check-prefix=NO_ROPTR
14 // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -flto %s 2>&1 | \
15 // RUN: FileCheck %s --check-prefixes=NO_DATA_SECTION_ERR,ROPTR,LINK,LTO_ROPTR
17 // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr %t.o 2>&1 | \
18 // RUN: FileCheck %s --check-prefix=LINK
20 // RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr \
21 // RUN: %s 2>&1 | FileCheck %s --check-prefix=TARGET_ROPTR_ERR
22 // RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr \
23 // RUN: %s 2>&1 | FileCheck %s --check-prefix=TARGET_NOROPTR_ERR
25 // RUN: not %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -shared \
26 // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=SHARED_ERR
27 // RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr -flto \
28 // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=TARGET_ROPTR_ERR
29 // RUN: not %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -flto -fno-data-sections \
30 // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=DATA_SECTION_ERR
31 // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mno-xcoff-roptr -flto -fno-data-sections \
32 // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=NO_DATA_SECTION_ERR
33 // RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr -flto \
34 // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=TARGET_NOROPTR_ERR
36 // DATA_SECTION_ERR: error: -mxcoff-roptr is supported only with -fdata-sections
37 // NO_DATA_SECTION_ERR-NOT: error: -mxcoff-roptr is supported only with -fdata-sections
38 // TARGET_ROPTR_ERR: error: unsupported option '-mxcoff-roptr' for target 'powerpc64le-unknown-linux-gnu'
39 // TARGET_NOROPTR_ERR: error: unsupported option '-mno-xcoff-roptr' for target 'powerpc64le-unknown-linux-gnu'
40 // SHARED_ERR: error: -mxcoff-roptr is not supported with -shared
42 // ROPTR: "-mxcoff-roptr"
43 // LINK: "-bforceimprw"
44 // LTO_ROPTR: "-bplugin_opt:-mxcoff-roptr"
45 // NO_ROPTR-NOT: "-mxcoff-roptr"
46 // NO_ROPTR-NOT: "-bforceimprw"