File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ void AMDGPUOpenMPToolChain::addClangTargetOptions(
47
47
assert (DeviceOffloadingKind == Action::OFK_OpenMP &&
48
48
" Only OpenMP offloading kinds are supported." );
49
49
50
+ CC1Args.push_back (" -fcuda-is-device" );
51
+
50
52
if (DriverArgs.hasArg (options::OPT_nogpulib))
51
53
return ;
52
54
Original file line number Diff line number Diff line change 7
7
8
8
// verify the tools invocations
9
9
// CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-emit-llvm-bc"{{.*}}"-x" "c"
10
- // CHECK: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}}"-target-cpu" "gfx906"
10
+ // CHECK: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}}"-fcuda-is-device"{{.*}}"- target-cpu" "gfx906"
11
11
// CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-emit-obj"
12
12
// CHECK: clang-linker-wrapper{{.*}} "-o" "a.out"
13
13
You can’t perform that action at this time.
0 commit comments