87 lines · c
1// Test LTO path, mcpu and opt level options2// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -O3 2>&1 \3// RUN: | FileCheck -check-prefixes=LTOPATH,MCPUOPTLEVEL %s4//5// LTOPATH: "-bplugin:{{.*}}libLTO.{{so|dll|dylib}}"6// MCPUOPTLEVEL: "-bplugin_opt:-mcpu={{.*}}" "-bplugin_opt:-O3"7 8// More opt level option tests9// 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 %s11// 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 %s13// 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 %s15// 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 %s17// 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 %s19// 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 %s21// 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 %s23// 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 %s25//26// O1: "-bplugin_opt:-O1"27// O2: "-bplugin_opt:-O2"28// O3: "-bplugin_opt:-O3"29 30// vec-extabi option31// 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 %s34// 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 %s36//37// VECEXTABI: "-bplugin_opt:-vec-extabi"38// NOVECEXTABI-NOT: "-bplugin_opt:-vec-extabi"39 40// Test debugging options41// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -gdbx 2>&1 \42// RUN: | FileCheck -check-prefix=DBX %s43// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld -g 2>&1 \44// RUN: | FileCheck -check-prefix=NODEBUGGER-TUNE %s45// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g 2>&1 \46// RUN: | FileCheck -check-prefixes=STRICT,NODEBUGGER-TUNE %s47// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### %s -flto -g 2>&1 \48// RUN: | FileCheck -check-prefixes=STRICT,NODEBUGGER-TUNE %s49// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -gdbx 2>&1 \50// RUN: | FileCheck -check-prefix=DBX -check-prefix=STRICT %s51// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb 2>&1 \52// RUN: | FileCheck -check-prefix=GDB -check-prefix=STRICT %s53// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb0 2>&1 \54// RUN: | FileCheck -check-prefix=GDB -check-prefix=NOSTRICT %s55// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -ggdb1 2>&1 \56// RUN: | FileCheck -check-prefix=GDB -check-prefix=STRICT %s57// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -g0 2>&1 \58// RUN: | FileCheck -check-prefix=NOSTRICT %s59// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -g -gno-strict-dwarf 2>&1 \60// RUN: | FileCheck -check-prefix=NOSTRICT %s61// RUN: %clang --target=powerpc-ibm-aix-xcoff -### %s -flto -gstrict-dwarf 2>&1 \62// RUN: | FileCheck -check-prefix=NOSTRICT %s63//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 options72// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fuse-ld=ld \73// RUN: -fcs-profile-generate 2>&1 | FileCheck -check-prefix=CSPGO %s74//75// CSPGO: "-bplugin_opt:-cs-profile-generate" "-bplugin_opt:-cs-profile-path=default_%m.profraw"76 77// Test integrated assembler options78// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fno-integrated-as \79// RUN: -fintegrated-as 2>&1 | FileCheck --check-prefix=INTAS %s80// RUN: %clang --target=powerpc-ibm-aix -### %s -flto -fintegrated-as \81// RUN: -fno-integrated-as 2>&1 | FileCheck --check-prefix=NOINTAS %s82// RUN: %clang --target=powerpc-ibm-aix -### %s -flto 2>&1 \83// RUN: | FileCheck --check-prefix=INTAS %s84//85// NOINTAS: "-bplugin_opt:-no-integrated-as=1"86// INTAS-NOT: "-bplugin_opt:-no-integrated-as"87