================
@@ -498,9 +507,13 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList 
&DriverArgs,
         addSystemInclude(DriverArgs, CC1Args, TargetDir.str());
         break;
       }
-      // Add generic path if nothing else succeeded so far.
+      // Add generic paths if nothing else succeeded so far.
       llvm::sys::path::append(Dir, "include", "c++", "v1");
       addSystemInclude(DriverArgs, CC1Args, Dir.str());
+      Dir = SysRootDir;
+      llvm::sys::path::append(Dir, Target, "include", "c++", "v1");
+      if (D.getVFS().exists(Dir))
+        addSystemInclude(DriverArgs, CC1Args, Dir.str());
----------------
petrhosek wrote:

I see, I still think we need to move this logic outside of the multilib loop to 
avoid adding the include directory multiple times. I think this entire loop 
might need to be restructured since I don't think it's actually correct, so it 
might be probably easiest for now to just move the new logic outside.

https://github.com/llvm/llvm-project/pull/165321
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to