mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
Default to PIC on OS X.
driver/target.h is due for a refactoring after the next release is branched off.
This commit is contained in:
@@ -175,6 +175,13 @@ llvm::TargetMachine* createTargetMachine(
|
||||
FeaturesStr = Features.getString();
|
||||
}
|
||||
|
||||
if (triple.isMacOSX() && relocModel == llvm::Reloc::Default)
|
||||
{
|
||||
// OS X defaults to PIC (and as of 10.7.5/LLVM 3.1-3.3, TLS use leads
|
||||
// to crashes for non-PIC code). LLVM doesn't handle this.
|
||||
relocModel = llvm::Reloc::PIC_;
|
||||
}
|
||||
|
||||
#if LDC_LLVM_VER == 300
|
||||
llvm::NoFramePointerElim = genDebugInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user