Supply appropriate arch info to darwin assembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-01-30 19:19:31 +00:00
parent 7757fff6ae
commit 59c8d8ae89

View File

@ -489,6 +489,22 @@ LTO::optimizeModules(const std::string &OutputFilename,
std::vector<const char*> args;
args.push_back(gcc.c_str());
if (strncmp(targetTriple.c_str(), "i686-apple-", 11) == 0) {
args.push_back("-arch");
args.push_back("i386");
}
if (strncmp(targetTriple.c_str(), "x86_64-apple-", 13) == 0) {
args.push_back("-arch");
args.push_back("x86_64");
}
if (strncmp(targetTriple.c_str(), "powerpc-apple-", 14) == 0) {
args.push_back("-arch");
args.push_back("ppc");
}
if (strncmp(targetTriple.c_str(), "powerpc64-apple-", 16) == 0) {
args.push_back("-arch");
args.push_back("ppc64");
}
args.push_back("-c");
args.push_back("-x");
args.push_back("assembler");