[PATCH] D101324: Hurd: Clean up Debian multiarch /usr/include/<triplet>
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 27 13:36:32 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe37c8fd364a9: Hurd: Clean up Debian multiarch /usr/include/<triplet> (authored by sthibaul, committed by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101324/new/
https://reviews.llvm.org/D101324
Files:
clang/lib/Driver/ToolChains/Hurd.cpp
Index: clang/lib/Driver/ToolChains/Hurd.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Hurd.cpp
+++ clang/lib/Driver/ToolChains/Hurd.cpp
@@ -170,11 +170,13 @@
AddMultilibIncludeArgs(DriverArgs, CC1Args);
- if (getTriple().getArch() == llvm::Triple::x86) {
- std::string Path = SysRoot + "/usr/include/i386-gnu";
- if (D.getVFS().exists(Path))
- addExternCSystemInclude(DriverArgs, CC1Args, Path);
- }
+ // On systems using multiarch, add /usr/include/$triple before
+ // /usr/include.
+ std::string MultiarchIncludeDir = getMultiarchTriple(D, getTriple(), SysRoot);
+ if (!MultiarchIncludeDir.empty() &&
+ D.getVFS().exists(SysRoot + "/usr/include/" + MultiarchIncludeDir))
+ addExternCSystemInclude(DriverArgs, CC1Args,
+ SysRoot + "/usr/include/" + MultiarchIncludeDir);
// Add an include of '/include' directly. This isn't provided by default by
// system GCCs, but is often used with cross-compiling GCCs, and harmless to
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101324.340970.patch
Type: text/x-patch
Size: 1050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210427/003ebd45/attachment.bin>
More information about the cfe-commits
mailing list