nixpkgs/pkgs/development/compilers/llvm/14/clang/add-nostdlibinc-flag.patch
Jyun-Yan You 44165d3657 llvmPackages_{14, git}.clang: add nostdlibinc flag
Fix header search paths as #153963
2022-09-30 09:33:05 +08:00

19 lines
464 B
Diff

diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 3bfddeefc7b2..05b11d9e562d 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -482,6 +482,13 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const {
}
#endif
+ {
+ Arg *A = DAL->MakeFlagArg(/*BaseArg=*/nullptr,
+ Opts.getOption(options::OPT_nostdlibinc));
+ A->claim();
+ DAL->append(A);
+ }
+
return DAL;
}