[llvm-commits] [llvm] r72881 - /llvm/trunk/tools/lto/LTOCodeGenerator.cpp
Nick Kledzik
kledzik at apple.com
Thu Jun 4 12:14:10 PDT 2009
Author: kledzik
Date: Thu Jun 4 14:14:08 2009
New Revision: 72881
URL: http://llvm.org/viewvc/llvm-project?rev=72881&view=rev
Log:
<rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
Modified:
llvm/trunk/tools/lto/LTOCodeGenerator.cpp
Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=72881&r1=72880&r2=72881&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Thu Jun 4 14:14:08 2009
@@ -249,6 +249,7 @@
std::string targetTriple = _linker.getModule()->getTargetTriple();
args.push_back(tool.c_str());
if ( targetTriple.find("darwin") != targetTriple.size() ) {
+ // darwin specific command line options
if (strncmp(targetTriple.c_str(), "i386-apple-", 11) == 0) {
args.push_back("-arch");
args.push_back("i386");
@@ -286,6 +287,9 @@
args.push_back("-arch");
args.push_back("armv6");
}
+ // add -static to assembler command line when code model requires
+ if ( (_assemblerPath != NULL) && (_codeModel == LTO_CODEGEN_PIC_MODEL_STATIC) )
+ args.push_back("-static");
}
if ( needsCompilerOptions ) {
args.push_back("-c");
More information about the llvm-commits
mailing list