mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
EngineBuilder: support for custom TargetOptions. Fixes the
ExceptionDemo example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2005,7 +2005,8 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// If not set, exception handling will not be turned on
|
||||
llvm::JITExceptionHandling = true;
|
||||
llvm::TargetOptions Opts;
|
||||
Opts.JITExceptionHandling = true;
|
||||
|
||||
llvm::InitializeNativeTarget();
|
||||
llvm::LLVMContext &context = llvm::getGlobalContext();
|
||||
@ -2018,6 +2019,7 @@ int main(int argc, char *argv[]) {
|
||||
llvm::EngineBuilder factory(module);
|
||||
factory.setEngineKind(llvm::EngineKind::JIT);
|
||||
factory.setAllocateGVsWithCode(false);
|
||||
factory.setTargetOptions(Opts);
|
||||
llvm::ExecutionEngine *executionEngine = factory.create();
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user