Recognize arm triplets.
authorEvan Cheng <evan.cheng@apple.com>
Wed, 1 Apr 2009 18:54:56 +0000 (18:54 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 1 Apr 2009 18:54:56 +0000 (18:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68229 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/LTOCodeGenerator.cpp

index b83b07941c8a3bc4105f95e369ac0a41e6ed982b..0d307150b691e386b6f4c3ac8814955a639cc01f 100644 (file)
@@ -240,6 +240,27 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath,
             args.push_back("-arch");
             args.push_back("ppc64");
         }
+        else if (strncmp(targetTriple.c_str(), "arm-apple-", 10) == 0) {
+            args.push_back("-arch");
+            args.push_back("arm");
+        }
+        else if ((strncmp(targetTriple.c_str(), "armv4t-apple-", 13) == 0) ||
+                 (strncmp(targetTriple.c_str(), "thumbv4t-apple-", 15) == 0)) {
+            args.push_back("-arch");
+            args.push_back("armv4t");
+        }
+        else if ((strncmp(targetTriple.c_str(), "armv5-apple-", 12) == 0) ||
+                 (strncmp(targetTriple.c_str(), "armv5e-apple-", 13) == 0) ||
+                 (strncmp(targetTriple.c_str(), "thumbv5-apple-", 14) == 0) ||
+                 (strncmp(targetTriple.c_str(), "thumbv5e-apple-", 15) == 0)) {
+            args.push_back("-arch");
+            args.push_back("armv5");
+        }
+        else if ((strncmp(targetTriple.c_str(), "armv6-apple-", 12) == 0) ||
+                 (strncmp(targetTriple.c_str(), "thumbv6-apple-", 14) == 0)) {
+            args.push_back("-arch");
+            args.push_back("armv6");
+        }
     }
     args.push_back("-c");
     args.push_back("-x");