aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 99eadf4..722cefb 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -2019,7 +2019,8 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const {
if (M.getDirectAccessExternalData() &&
!TM.getTargetTriple().isWindowsGNUEnvironment() &&
!TM.getTargetTriple().isOSFreeBSD() &&
- !TM.getTargetTriple().isOSDarwin())
+ (!TM.getTargetTriple().isOSDarwin() ||
+ TM.getRelocationModel() == Reloc::Static))
GV->setDSOLocal(true);
}
}