Skip to content

Commit 6c482d9

Browse files
Merge pull request #30075 from aschwaighofer/irgen_reinstate_jit_workaround
IRGen: Reinstate JIT workaround removed in PR #28704
2 parents 75c3661 + 335be17 commit 6c482d9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,7 +2667,10 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
26672667

26682668
// rdar://problem/53836960: i386 ld64 also mis-links relative references
26692669
// to GOT entries.
2670-
if (!IGM.Triple.isOSDarwin() || IGM.Triple.getArch() != llvm::Triple::x86) {
2670+
// rdar://problem/59782487: issue with on-device JITd expressions.
2671+
// The JIT gets confused by private vars accessed accross object files.
2672+
if (!IGM.getOptions().UseJIT &&
2673+
(!IGM.Triple.isOSDarwin() || IGM.Triple.getArch() != llvm::Triple::x86)) {
26712674
gotEquivalent->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
26722675
} else {
26732676
ApplyIRLinkage(IRLinkage::InternalLinkOnceODR)

0 commit comments

Comments
 (0)