[PATCH] D125265: [OpenMP] Don't include the device wrappers if -nostdinc is used

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 9 13:02:45 PDT 2022


jhuber6 updated this revision to Diff 428181.
jhuber6 added a comment.

Fix using `nostdlib` instead of `nostdinc`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125265

Files:
  clang/lib/Driver/ToolChains/Clang.cpp


Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -1308,6 +1308,7 @@
   // If we are offloading to a target via OpenMP we need to include the
   // openmp_wrappers folder which contains alternative system headers.
   if (JA.isDeviceOffloading(Action::OFK_OpenMP) &&
+      !Args.hasArg(options::OPT_nostdinc) &&
       (getToolChain().getTriple().isNVPTX() ||
        getToolChain().getTriple().isAMDGCN())) {
     if (!Args.hasArg(options::OPT_nobuiltininc)) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125265.428181.patch
Type: text/x-patch
Size: 612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220509/e699c97f/attachment.bin>


More information about the cfe-commits mailing list