Skip to content

Commit a71528c

Browse files
committed
Actually request the use of the large code model for ppc64/ppc64le
Instead of erroring out with an assert.
1 parent 3b0d691 commit a71528c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ CreateHostTargetMachine(const clang::CompilerInstance& CI) {
7373
JTMB->getOptions().EmulatedTLS = false;
7474
#endif // _WIN32
7575

76-
std::unique_ptr<TargetMachine> TM = cantFail(JTMB->createTargetMachine());
77-
7876
#if defined(__powerpc64__) || defined(__PPC64__)
7977
// We have to use large code model for PowerPC64 because TOC and text sections
8078
// can be more than 2GB apart.
81-
assert(TM->getCodeModel() >= CodeModel::Large);
79+
JTMB->setCodeModel(CodeModel::Large);
8280
#endif
8381

82+
std::unique_ptr<TargetMachine> TM = cantFail(JTMB->createTargetMachine());
83+
8484
// Forcefully disable GlobalISel, it might be enabled on AArch64 without
8585
// optimizations. In tests on an Apple M1 after the upgrade to LLVM 9, this
8686
// new instruction selection framework emits branches / calls that expect all

0 commit comments

Comments
 (0)