mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
Rework logic and comment out the default relocation models for PPC.
llvm-svn: 305630
This commit is contained in:
parent
6321be89df
commit
7db18ea118
@ -192,16 +192,19 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
|||||||
|
|
||||||
static Reloc::Model getEffectiveRelocModel(const Triple &TT,
|
static Reloc::Model getEffectiveRelocModel(const Triple &TT,
|
||||||
Optional<Reloc::Model> RM) {
|
Optional<Reloc::Model> RM) {
|
||||||
if (!RM.hasValue()) {
|
if (RM.hasValue())
|
||||||
if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le) {
|
return *RM;
|
||||||
if (!TT.isOSBinFormatMachO() && !TT.isMacOSX())
|
|
||||||
return Reloc::PIC_;
|
// Darwin defaults to dynamic-no-pic.
|
||||||
}
|
if (TT.isOSDarwin())
|
||||||
if (TT.isOSDarwin())
|
return Reloc::DynamicNoPIC;
|
||||||
return Reloc::DynamicNoPIC;
|
|
||||||
return Reloc::Static;
|
// Non-darwin 64-bit platforms are PIC by default.
|
||||||
}
|
if (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le)
|
||||||
return *RM;
|
return Reloc::PIC_;
|
||||||
|
|
||||||
|
// 32-bit is static by default.
|
||||||
|
return Reloc::Static;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The FeatureString here is a little subtle. We are modifying the feature
|
// The FeatureString here is a little subtle. We are modifying the feature
|
||||||
|
Loading…
Reference in New Issue
Block a user