[PATCH] D142486: [OpenMP] Unconditionally link the OpenMP device RTL static library
Joseph Huber via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 24 15:01:52 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdc60f7aa0435: [OpenMP] Unconditionally link the OpenMP device RTL static library (authored by jhuber6).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142486/new/
https://reviews.llvm.org/D142486
Files:
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/test/Driver/openmp-offload-gpu.c
Index: clang/test/Driver/openmp-offload-gpu.c
===================================================================
--- clang/test/Driver/openmp-offload-gpu.c
+++ clang/test/Driver/openmp-offload-gpu.c
@@ -341,6 +341,11 @@
// CHECK-LTO-LIBRARY: {{.*}}-lomptarget{{.*}}-lomptarget.devicertl
+// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-LTO-LIBRARY %s
+
+// CHECK-NO-LTO-LIBRARY: {{.*}}-lomptarget{{.*}}-lomptarget.devicertl
+
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 -nogpulib \
// RUN: -foffload-lto %s 2>&1 | FileCheck --check-prefix=CHECK-NO-LIBRARY %s
Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -873,8 +873,7 @@
if (IsOffloadingHost)
CmdArgs.push_back("-lomptarget");
- if (IsOffloadingHost && TC.getDriver().isUsingLTO(/* IsOffload */ true) &&
- !Args.hasArg(options::OPT_nogpulib))
+ if (IsOffloadingHost && !Args.hasArg(options::OPT_nogpulib))
CmdArgs.push_back("-lomptarget.devicertl");
addArchSpecificRPath(TC, Args, CmdArgs);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142486.491926.patch
Type: text/x-patch
Size: 1305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230124/c9d477ab/attachment-0001.bin>
More information about the cfe-commits
mailing list