[Orc] Honor hasJIT in JITTargetMachineBuilder::createTargetMachine
Even with D129349 <https://reviews.llvm.org/D129349>, various SPARC JIT tests still `FAIL`. They are guarded by `host-supports-jit`. This is set from `clang-repl --host-supports-jit` which still returns `true`. It turns out the `JITTargetMachineBuilder` doesn't consider `hasJIT` at all. This patch corrects this, turning the affected tests `UNSUPPORTED`. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D129350
This commit is contained in:
parent
09c1ee1086
commit
8922adf646
|
@ -48,6 +48,10 @@ JITTargetMachineBuilder::createTargetMachine() {
|
|||
if (!TheTarget)
|
||||
return make_error<StringError>(std::move(ErrMsg), inconvertibleErrorCode());
|
||||
|
||||
if (!TheTarget->hasJIT())
|
||||
return make_error<StringError>("Target has no JIT support",
|
||||
inconvertibleErrorCode());
|
||||
|
||||
auto *TM =
|
||||
TheTarget->createTargetMachine(TT.getTriple(), CPU, Features.getString(),
|
||||
Options, RM, CM, OptLevel, /*JIT*/ true);
|
||||
|
|
Loading…
Reference in a new issue