Author: dpatel Date: Wed Jan 30 13:19:31 2008 New Revision: 46567 URL: http://llvm.org/viewvc/llvm-project?rev=46567&view=rev Log: Supply appropriate arch info to darwin assembler.
Modified: llvm/trunk/tools/lto/lto.cpp Modified: llvm/trunk/tools/lto/lto.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/lto.cpp?rev=46567&r1=46566&r2=46567&view=diff ============================================================================== --- llvm/trunk/tools/lto/lto.cpp (original) +++ llvm/trunk/tools/lto/lto.cpp Wed Jan 30 13:19:31 2008 @@ -489,6 +489,22 @@ 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"); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits