aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp7
-rw-r--r--tools/lto/LTOModule.cpp7
2 files changed, 14 insertions, 0 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 57e7a2d07f..68956525c0 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -225,6 +225,13 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg) {
return false;
std::string TripleStr = _linker.getModule()->getTargetTriple();
+ // @LOCALMOD-BEGIN
+ // Pretend that we are ARM for name mangling and assembly conventions.
+ // https://code.google.com/p/nativeclient/issues/detail?id=2554
+ if (TripleStr == "le32-unknown-nacl") {
+ TripleStr = "armv7a-none-nacl-gnueabi";
+ }
+ // @LOCALMOD-END
if (TripleStr.empty())
TripleStr = sys::getDefaultTargetTriple();
llvm::Triple Triple(TripleStr);
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index fce0bb062a..0263e31c8b 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -280,6 +280,13 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer,
}
std::string TripleStr = m->getTargetTriple();
+ // @LOCALMOD-BEGIN
+ // Pretend that we are ARM for name mangling and assembly conventions.
+ // https://code.google.com/p/nativeclient/issues/detail?id=2554
+ if (TripleStr == "le32-unknown-nacl") {
+ TripleStr = "armv7a-none-nacl-gnueabi";
+ }
+ // @LOCALMOD-END
if (TripleStr.empty())
TripleStr = sys::getDefaultTargetTriple();
llvm::Triple Triple(TripleStr);