49 lines · c
1// RUN: %clang -### --target=amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s2// RUN: %clang -### -g --target=amdgcn--amdhsa -mcpu=kaveri -nogpulib %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s3// RUN: %clang -### --target=amdgcn-amd-amdpal -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s4// RUN: %clang -### -g --target=amdgcn-amd-amdpal -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s5// RUN: %clang -### --target=amdgcn-mesa-mesa3d -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s6// RUN: %clang -### -g --target=amdgcn-mesa-mesa3d -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s7 8// AS_LINK: "-cc1as"9// AS_LINK: ld.lld{{.*}} "--no-undefined" "-shared"10 11// DWARF_VER: "-dwarf-version=5"12 13// RUN: %clang -### --target=amdgcn--amdhsa -x assembler \14// RUN: -Wl,--unresolved-symbols=ignore-all %s 2>&1 | FileCheck -check-prefix=AS_LINK_UR %s15// RUN: %clang -### --target=amdgcn--amdhsa -x assembler \16// RUN: -Xlinker --unresolved-symbols=ignore-all %s 2>&1 | FileCheck -check-prefix=AS_LINK_UR %s17 18// AS_LINK_UR: "-cc1as"19// AS_LINK_UR: ld.lld{{.*}} "--no-undefined"{{.*}} "--unresolved-symbols=ignore-all"20 21// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx90a:xnack+:sramecc- -nogpulib \22// RUN: -L. -flto -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=LTO %s23// LTO: clang{{.*}}"-flto=full"{{.*}}"-fconvergent-functions"24// LTO: ld.lld{{.*}}"-plugin-opt=mcpu=gfx90a"{{.*}}"-plugin-opt=-mattr=-sramecc,+xnack"{{.*}}25 26// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx90a:xnack+:sramecc- -nogpulib \27// RUN: -L. -fconvergent-functions %s 2>&1 | FileCheck -check-prefix=MCPU %s28// MCPU: ld.lld{{.*}}"-plugin-opt=mcpu=gfx90a"{{.*}}"-plugin-opt=-mattr=-sramecc,+xnack"{{.*}}29 30// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 -nogpulib \31// RUN: -fuse-ld=ld %s 2>&1 | FileCheck -check-prefixes=LD %s32// LD: ld.lld33 34// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 -nogpulib \35// RUN: -r %s 2>&1 | FileCheck -check-prefixes=RELO %s36// RELO-NOT: -shared37 38// RUN: %clang -target amdgcn-amd-amdhsa -march=gfx90a -stdlib -startfiles \39// RUN: -nogpulib -nogpuinc -### %s 2>&1 | FileCheck -check-prefix=STARTUP %s40// STARTUP: ld.lld{{.*}}"-lc" "-lm" "{{.*}}crt1.o"41 42// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=gfx906 %s 2>&1 | FileCheck -check-prefix=ROCM %s43// ROCM-NOT: -mlink-builtin-bitcode44 45// RUN: %clang -### --target=amdgcn-amd-amdhsa -mcpu=fiji -x ir %s \46// RUN: --rocm-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode 2>&1 \47// RUN: | FileCheck -check-prefix=DEVICE-LIBS %s48// DEVICE-LIBS: "-mlink-builtin-bitcode" "[[ROCM_PATH:.+]]ockl.bc"49