mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +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:
@ -26,6 +26,7 @@
|
||||
#include "llvm/Support/ValueHandle.h"
|
||||
#include "llvm/Support/Mutex.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -462,6 +463,7 @@ private:
|
||||
CodeGenOpt::Level OptLevel;
|
||||
JITMemoryManager *JMM;
|
||||
bool AllocateGVsWithCode;
|
||||
TargetOptions Options;
|
||||
Reloc::Model RelocModel;
|
||||
CodeModel::Model CMModel;
|
||||
std::string MArch;
|
||||
@ -475,6 +477,7 @@ private:
|
||||
ErrorStr = NULL;
|
||||
OptLevel = CodeGenOpt::Default;
|
||||
JMM = NULL;
|
||||
Options = TargetOptions();
|
||||
AllocateGVsWithCode = false;
|
||||
RelocModel = Reloc::Default;
|
||||
CMModel = CodeModel::JITDefault;
|
||||
@ -518,6 +521,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// setTargetOptions - Set the target options that the ExecutionEngine
|
||||
/// target is using. Defaults to TargetOptions().
|
||||
EngineBuilder &setTargetOptions(const TargetOptions &Opts) {
|
||||
Options = Opts;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// setRelocationModel - Set the relocation model that the ExecutionEngine
|
||||
/// target is using. Defaults to target specific default "Reloc::Default".
|
||||
EngineBuilder &setRelocationModel(Reloc::Model RM) {
|
||||
@ -578,6 +588,7 @@ public:
|
||||
StringRef MArch,
|
||||
StringRef MCPU,
|
||||
const SmallVectorImpl<std::string>& MAttrs,
|
||||
const TargetOptions &Options,
|
||||
Reloc::Model RM,
|
||||
CodeModel::Model CM,
|
||||
CodeGenOpt::Level OL,
|
||||
|
Reference in New Issue
Block a user