[PATCH] D157438: [OpenMP] Ensure wrapper headers are included on both host and device

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 14:55:19 PDT 2023


yaxunl added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1190-1191
     // the resource directory at clang/lib/Headers/llvm_libc_wrappers.
-    if (C.getActiveOffloadKinds() == Action::OFK_None) {
+    if ((getToolChain().getTriple().isNVPTX() ||
+         getToolChain().getTriple().isAMDGCN()) &&
+        C.getActiveOffloadKinds() == Action::OFK_None) {
----------------
jhuber6 wrote:
> arsenm wrote:
> > can we do something better than this NVPTX||AMDGCN checks
> This is more or less "Are we one of the GPUs `libc` supports". This is for cross-compiling so there's no existing infrastructure.
maybe add a variable bool HasGPULibC as it is also used in other places below


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157438/new/

https://reviews.llvm.org/D157438



More information about the cfe-commits mailing list