[PATCH] D51464: clang: fix MIPS/N32 triple and paths
YunQiang Su via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 29 18:50:31 PDT 2018
wzssyqa updated this revision to Diff 167631.
https://reviews.llvm.org/D51464
Files:
lib/Driver/ToolChains/Arch/Mips.cpp
lib/Driver/ToolChains/Gnu.cpp
Index: lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- lib/Driver/ToolChains/Gnu.cpp
+++ lib/Driver/ToolChains/Gnu.cpp
@@ -2060,7 +2060,6 @@
case llvm::Triple::mipsel:
LibDirs.append(begin(MIPSELLibDirs), end(MIPSELLibDirs));
TripleAliases.append(begin(MIPSELTriples), end(MIPSELTriples));
- TripleAliases.append(begin(MIPSTriples), end(MIPSTriples));
BiarchLibDirs.append(begin(MIPS64ELLibDirs), end(MIPS64ELLibDirs));
BiarchTripleAliases.append(begin(MIPS64ELTriples), end(MIPS64ELTriples));
BiarchLibDirs.append(begin(MIPSN32ELLibDirs), end(MIPSN32ELLibDirs));
Index: lib/Driver/ToolChains/Arch/Mips.cpp
===================================================================
--- lib/Driver/ToolChains/Arch/Mips.cpp
+++ lib/Driver/ToolChains/Arch/Mips.cpp
@@ -82,6 +82,9 @@
}
}
+ if (ABIName.empty() && (Triple.getEnvironment() == llvm::Triple::GNUABIN32))
+ ABIName = "n32";
+
if (ABIName.empty() &&
(Triple.getVendor() == llvm::Triple::MipsTechnologies ||
Triple.getVendor() == llvm::Triple::ImaginationTechnologies)) {
@@ -104,15 +107,8 @@
.Case("octeon", "n64")
.Case("p5600", "o32")
.Default("");
- if (Triple.getEnvironment() == llvm::Triple::GNUABIN32)
- ABIName = llvm::StringSwitch<llvm::StringRef>(ABIName)
- .Case("n64", "n32")
- .Default(ABIName);
}
- if (ABIName.empty() && (Triple.getEnvironment() == llvm::Triple::GNUABIN32))
- ABIName = "n32";
-
if (ABIName.empty()) {
// Deduce ABI name from the target triple.
ABIName = Triple.isMIPS32() ? "o32" : "n64";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51464.167631.patch
Type: text/x-patch
Size: 1714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180930/7023a974/attachment.bin>
More information about the cfe-commits
mailing list