mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
For Darwin / x86_64, override -relocation-model=static to pic if the output is assembly since Darwin assembler does not really support -static codeine.
I view this as a temporary workaround until the assembler / linker changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72806 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -213,6 +213,13 @@ bool X86TargetMachine::addAssemblyEmitter(PassManagerBase &PM,
|
||||
CodeGenOpt::Level OptLevel,
|
||||
bool Verbose,
|
||||
raw_ostream &Out) {
|
||||
// FIXME: Move this somewhere else!
|
||||
// On Darwin, override 64-bit static relocation to pic_ since the
|
||||
// assembler doesn't support it.
|
||||
if (DefRelocModel == Reloc::Static &&
|
||||
Subtarget.isTargetDarwin() && Subtarget.is64Bit())
|
||||
setRelocationModel(Reloc::PIC_);
|
||||
|
||||
assert(AsmPrinterCtor && "AsmPrinter was not linked in");
|
||||
if (AsmPrinterCtor)
|
||||
PM.add(AsmPrinterCtor(Out, *this, OptLevel, Verbose));
|
||||
|
||||
Reference in New Issue
Block a user