forked from rosa/hakurei
LLVM itself is unlikely to ever be migrated due to complexity of the bootstrap, so migrate patches instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
|
|
index 8ac8d4eb9181..e46b04a898ca 100644
|
|
--- a/clang/lib/Driver/ToolChains/Linux.cpp
|
|
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
|
|
@@ -671,6 +671,12 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
|
addExternCSystemInclude(
|
|
DriverArgs, CC1Args,
|
|
concat(SysRoot, "/usr/include", MultiarchIncludeDir));
|
|
+ if (!MultiarchIncludeDir.empty() &&
|
|
+ D.getVFS().exists(concat(SysRoot, "/system/include", MultiarchIncludeDir)))
|
|
+ addExternCSystemInclude(
|
|
+ DriverArgs, CC1Args,
|
|
+ concat(SysRoot, "/system/include", MultiarchIncludeDir));
|
|
+
|
|
|
|
if (getTriple().getOS() == llvm::Triple::RTEMS)
|
|
return;
|
|
@@ -681,6 +687,7 @@ void Linux::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
|
addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/include"));
|
|
|
|
addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/usr/include"));
|
|
+ addExternCSystemInclude(DriverArgs, CC1Args, concat(SysRoot, "/system/include"));
|
|
|
|
if (!DriverArgs.hasArg(options::OPT_nobuiltininc) && getTriple().isMusl())
|
|
addSystemInclude(DriverArgs, CC1Args, ResourceDirInclude);
|