Skip to content

Commit 03ee1f2

Browse files
DominikAdamskilravenclaw
authored andcommitted
Revert "[AMDGPU][OpenMP] Do not attach -fcuda-is-device flag for AMDGPU OpenMP" (llvm#97531)
Reverts llvm#96909 (commit ID: 8bb00cb) It breaks OpenMP CI: https://gitlab.e4s.io/uo-public/llvm-openmp-offloading/-/jobs/283716
1 parent e07f093 commit 03ee1f2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ void AMDGPUOpenMPToolChain::addClangTargetOptions(
4747
assert(DeviceOffloadingKind == Action::OFK_OpenMP &&
4848
"Only OpenMP offloading kinds are supported.");
4949

50+
CC1Args.push_back("-fcuda-is-device");
51+
5052
if (DriverArgs.hasArg(options::OPT_nogpulib))
5153
return;
5254

clang/test/Driver/amdgpu-openmp-toolchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// verify the tools invocations
99
// 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"
1111
// CHECK: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-emit-obj"
1212
// CHECK: clang-linker-wrapper{{.*}} "-o" "a.out"
1313

0 commit comments

Comments
 (0)