| 1 |
// Test LTO path, mcpu and opt level options |
| 2 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -O3 2>&1 \ |
| 3 |
// RUN: | FileCheck -check-prefixes=LTOPATH,MCPUOPTLEVEL %s |
| 4 |
// |
| 5 |
// LTOPATH: "-bplugin:{{.*}}libLTO.{{so|dll|dylib}}" |
| 6 |
// MCPUOPTLEVEL: "-bplugin_opt:-mcpu={{.*}}" "-bplugin_opt:-O3" |
| 7 |
|
| 8 |
// More opt level option tests |
| 9 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 10 |
// RUN: -fuse-ld=ld -flto -O -### 2>&1 | FileCheck --check-prefix=O1 %s |
| 11 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 12 |
// RUN: -fuse-ld=ld -flto -O1 -### 2>&1 | FileCheck --check-prefix=O1 %s |
| 13 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 14 |
// RUN: -fuse-ld=ld -flto -Og -### 2>&1 | FileCheck --check-prefix=O1 %s |
| 15 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 16 |
// RUN: -fuse-ld=ld -flto -O2 -### 2>&1 | FileCheck --check-prefix=O2 %s |
| 17 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 18 |
// RUN: -fuse-ld=ld -flto -Os -### 2>&1 | FileCheck --check-prefix=O2 %s |
| 19 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 20 |
// RUN: -fuse-ld=ld -flto -Oz -### 2>&1 | FileCheck --check-prefix=O2 %s |
| 21 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 22 |
// RUN: -fuse-ld=ld -flto -O3 -### 2>&1 | FileCheck --check-prefix=O3 %s |
| 23 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 24 |
// RUN: -fuse-ld=ld -flto -Ofast -### 2>&1 | FileCheck --check-prefix=O3 %s |
| 25 |
// |
| 26 |
// O1: "-bplugin_opt:-O1" |
| 27 |
// O2: "-bplugin_opt:-O2" |
| 28 |
// O3: "-bplugin_opt:-O3" |
| 29 |
|
| 30 |
// vec-extabi option |
| 31 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 32 |
// RUN: -fuse-ld=ld -flto -mabi=vec-extabi -### 2>&1 \ |
| 33 |
// RUN: | FileCheck --check-prefix=VECEXTABI %s |
| 34 |
// RUN: %clang --target=powerpc-ibm-aix --sysroot %S/Inputs/aix_ppc_tree %s \ |
| 35 |
// RUN: -fuse-ld=ld -flto -### 2>&1 | FileCheck --check-prefix=NOVECEXTABI %s |
| 36 |
// |
| 37 |
// VECEXTABI: "-bplugin_opt:-vec-extabi" |
| 38 |
// NOVECEXTABI-NOT: "-bplugin_opt:-vec-extabi" |
| 39 |
|
| 40 |
// Test debugging options |
| 41 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -gdbx 2>&1 \ |
| 42 |
// RUN: | FileCheck -check-prefix=DBX %s |
| 43 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -g 2>&1 \ |
| 44 |
// RUN: | FileCheck -check-prefix=NODEBUGGER-TUNE %s |
| 45 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g 2>&1 \ |
| 46 |
// RUN: | FileCheck -check-prefixes=STRICT,NODEBUGGER-TUNE %s |
| 47 |
// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### %s -flto -g 2>&1 \ |
| 48 |
// RUN: | FileCheck -check-prefixes=STRICT,NODEBUGGER-TUNE %s |
| 49 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -gdbx 2>&1 \ |
| 50 |
// RUN: | FileCheck -check-prefix=DBX -check-prefix=STRICT %s |
| 51 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb 2>&1 \ |
| 52 |
// RUN: | FileCheck -check-prefix=GDB -check-prefix=STRICT %s |
| 53 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb0 2>&1 \ |
| 54 |
// RUN: | FileCheck -check-prefix=GDB -check-prefix=NOSTRICT %s |
| 55 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb1 2>&1 \ |
| 56 |
// RUN: | FileCheck -check-prefix=GDB -check-prefix=STRICT %s |
| 57 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -g0 2>&1 \ |
| 58 |
// RUN: | FileCheck -check-prefix=NOSTRICT %s |
| 59 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -gno-strict-dwarf 2>&1 \ |
| 60 |
// RUN: | FileCheck -check-prefix=NOSTRICT %s |
| 61 |
// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -gstrict-dwarf 2>&1 \ |
| 62 |
// RUN: | FileCheck -check-prefix=NOSTRICT %s |
| 63 |
// |
| 64 |
// DBX: "-bplugin_opt:-debugger-tune=dbx" |
| 65 |
// GDB: "-bplugin_opt:-debugger-tune=gdb" |
| 66 |
// NODEBUGGER-TUNE-NOT: "-bplugin_opt:-debugger-tune=" |
| 67 |
// |
| 68 |
// STRICT: "-bplugin_opt:-strict-dwarf=true" |
| 69 |
// NOSTRICT-NOT: "-bplugin_opt:-strict-dwarf=true" |
| 70 |
|
| 71 |
// Test cspgo options |
| 72 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld \ |
| 73 |
// RUN: -fcs-profile-generate 2>&1 | FileCheck -check-prefix=CSPGO %s |
| 74 |
// |
| 75 |
// CSPGO: "-bplugin_opt:-cs-profile-generate" "-bplugin_opt:-cs-profile-path=default_%m.profraw" |
| 76 |
|
| 77 |
// Test integrated assembler options |
| 78 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fno-integrated-as \ |
| 79 |
// RUN: -fintegrated-as 2>&1 | FileCheck --check-prefix=INTAS %s |
| 80 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fintegrated-as \ |
| 81 |
// RUN: -fno-integrated-as 2>&1 | FileCheck --check-prefix=NOINTAS %s |
| 82 |
// RUN: %clang --target=powerpc-ibm-aix -### %s -flto 2>&1 \ |
| 83 |
// RUN: | FileCheck --check-prefix=INTAS %s |
| 84 |
// |
| 85 |
// NOINTAS: "-bplugin_opt:-no-integrated-as=1" |
| 86 |
// INTAS-NOT: "-bplugin_opt:-no-integrated-as" |