[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 17:19:59 PDT 2019


smeenai marked an inline comment as done.
smeenai added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:1307
+          HasStdlibxxIsystem ? TC.AddClangCXXStdlibIsystemArgs(Args, CmdArgs)
+                             : TC.AddClangCXXStdlibIncludeArgs(Args, CmdArgs);
+        });
----------------
ldionne wrote:
> So, before, we would populate `-stdlib=XXX` here unconditionally for `cc1`.
> 
> After the patch, we do _not_ populate `-stdlib=XXX` and instead we pass `-internal-isystem` to `cc1` with the contents of `-stdlib++-isystem` whenever that option is provided, otherwise we fall back to the previous behaviour.
> 
> Did I get that right? If so, could we investigate getting rid of `AddClangCXXStdlibIncludeArgs` altogether? I don't think it is needed anymore since my refactor of the driver for Darwin.
Sorry, I'd missed this. You're right; we'll continue passing `-stdlib=XXX` in the old case (i.e. when there's no `-stdlib++-isystem` argument), but not if it's there.

When you say getting rid of `AddClangCXXStdlibIncludeArgs`, that's the one in the driver (in the toolchains) right? I thought your Darwin refactor involved moving C++ header search logic from the frontend into the driver ... did you mean getting rid of the C++ header search path logic in the frontend?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64089





More information about the cfe-commits mailing list