MachO: use "arm64" as the triple name in modules.
Current versions of ld64 can't cope with "aarch64" being stored. I'm fixing
that, but in the transitionary period we'll need to still emit "arm64".
rdar://problem/17783765
llvm-svn: 213852
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 4f90d08..d2c2d55 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -221,6 +221,17 @@
}
return Triple.getTriple();
}
+ case llvm::Triple::aarch64: {
+ llvm::Triple Triple = getTriple();
+ if (!Triple.isOSBinFormatMachO())
+ return getTripleString();
+
+ // FIXME: older versions of ld64 expect the "arm64" component in the actual
+ // triple string and query it to determine whether an LTO file can be
+ // handled. Remove this when we don't care any more.
+ Triple.setArchName("arm64");
+ return Triple.getTriple();
+ }
case llvm::Triple::arm:
case llvm::Triple::armeb:
case llvm::Triple::thumb: