[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 9 10:12:56 PDT 2024


================
@@ -35,6 +35,24 @@ UEFI::UEFI(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
 
 Tool *UEFI::buildLinker() const { return new tools::uefi::Linker(*this); }
 
+void UEFI::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
+                                     ArgStringList &CC1Args) const {
+  if (DriverArgs.hasArg(options::OPT_nostdinc))
+    return;
+
+  if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
+    SmallString<128> Dir(getDriver().ResourceDir);
+    llvm::sys::path::append(Dir, "include");
+    addSystemInclude(DriverArgs, CC1Args, Dir.str());
----------------
Prabhuk wrote:

@petrhosek -- Introduced this to include headers from clang resource directory. Rest of this method implementation is copied from Baremetal driver without much thought. PTAL.

https://github.com/llvm/llvm-project/pull/111473


More information about the cfe-commits mailing list