================
@@ -417,10 +417,20 @@ void BareMetal::AddClangSystemIncludeArgs(const ArgList 
&DriverArgs,
   const SmallString<128> SysRootDir(computeSysRoot());
   if (!SysRootDir.empty()) {
     for (const Multilib &M : getOrderedMultilibs()) {
-      SmallString<128> Dir(SysRootDir);
-      llvm::sys::path::append(Dir, M.includeSuffix());
-      llvm::sys::path::append(Dir, "include");
-      addSystemInclude(DriverArgs, CC1Args, Dir.str());
+      if (!M.includeDirs().empty()) {
+        // Add include directories specified in multilib.yaml under the
+        // 'IncludeDirs' field
----------------
petrhosek wrote:

This is just a very minor nit, but one the deliberate design decisions we made 
during the implementation of `multilib.yaml` was to keep the `MultilibBuilder` 
object interface as an alternative way to initialize the multilibs and this API 
is still being used e.g. by RISC-V. Therefore we shouldn't assume that 
`multilib.yaml` was used to initialize the multilib because that could be 
misleading.
```suggestion
```

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

Reply via email to