[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / hip-fpie-option.hip
blobc414828897d07c70c299dec253d698b85d3c40e8
1 // REQUIRES: amdgpu-registered-target, default-pie-on-linux
3 // -fPIC and -fPIE only affects host relocation model.
4 // device compilation always uses PIC. 
6 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
7 // RUN:   --offload-arch=gfx906 %s -nogpulib -nogpuinc \
8 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
10 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
11 // RUN:   -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
12 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
14 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
15 // RUN:   --offload-arch=gfx906 %s -nogpulib -nogpuinc \
16 // RUN:   -fPIC \
17 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIC %s
19 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
20 // RUN:   -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
21 // RUN:   -fPIC \
22 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIC %s
24 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
25 // RUN:   --offload-arch=gfx906 %s -nogpulib -nogpuinc \
26 // RUN:   -fPIE \
27 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
29 // RUN: %clang -### --target=x86_64-unknown-linux-gnu \
30 // RUN:   -fgpu-rdc --offload-arch=gfx906 %s -nogpulib -nogpuinc \
31 // RUN:   -fPIE \
32 // RUN:   2>&1 | FileCheck -check-prefixes=DEV,HOST-PIE %s
34 // DEV-DAG: {{".*clang.*".* "-triple" "amdgcn-amd-amdhsa".* "-mrelocation-model" "pic" "-pic-level" "[1|2]".* "-mframe-pointer=all"}}
35 // HOST-PIC-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2"}}
36 // HOST-PIC-NOT: "-pic-is-pie"
37 // HOST-PIE-DAG: {{".*clang.*".* "-triple" "x86_64-unknown-linux-gnu".* "-mrelocation-model" "pic" "-pic-level" "2" "-pic-is-pie"}}
38 // DEV-NOT: {{".*clang.*".* "-triple" "amdgcn-amd-amdhsa".* "-pic-is-pie"}}