mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
<rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac2764040f
commit
d8b4711a16
@ -249,6 +249,7 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath,
|
||||
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 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath,
|
||||
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user