dexonsmith requested changes to this revision.
dexonsmith added inline comments.
This revision now requires changes to proceed.


================
Comment at: clang/include/clang/Driver/Options.td:503-504
 def bind__at__load : Flag<["-"], "bind_at_load">;
+def builtininc : Flag<["-"], "builtininc">,
+  HelpText<"Enable builtin #include directories even when -nostdinc is used">;
 def bundle__loader : Separate<["-"], "bundle_loader">;
----------------
I think `-ibuiltininc` might be better, since we already have lots of options 
that start with `-i` related to include paths.  Please also clarify in the 
HelpText that this overrules `-nostdinc` even if `-nostdinc` comes later.


================
Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:1883-1888
   // Add the Clang builtin headers (<resource>/include)
-  if (!NoStdInc && !NoBuiltinInc) {
+  if (!(NoStdInc && !ForceBuiltinInc) && !NoBuiltinInc) {
     SmallString<128> P(D.ResourceDir);
     llvm::sys::path::append(P, "include");
     addSystemInclude(DriverArgs, CC1Args, P);
   }
----------------
It's probably better to let `-ibuiltininc` and `-nobuiltininc` cancel each 
other out, via a "last one wins" rule.  If you agree, consider documenting the 
behaviour also in the HelpText.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73500



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to