mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Introduce MCCodeGenInfo, which keeps information that can affect codegen
(including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -108,6 +108,21 @@ namespace {
|
||||
NoLazyCompilation("disable-lazy-compilation",
|
||||
cl::desc("Disable JIT lazy compilation"),
|
||||
cl::init(false));
|
||||
|
||||
cl::opt<Reloc::Model>
|
||||
RelocModel("relocation-model",
|
||||
cl::desc("Choose relocation model"),
|
||||
cl::init(Reloc::Default),
|
||||
cl::values(
|
||||
clEnumValN(Reloc::Default, "default",
|
||||
"Target default relocation model"),
|
||||
clEnumValN(Reloc::Static, "static",
|
||||
"Non-relocatable code"),
|
||||
clEnumValN(Reloc::PIC_, "pic",
|
||||
"Fully relocatable, position independent code"),
|
||||
clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic",
|
||||
"Relocatable external references, non-relocatable code"),
|
||||
clEnumValEnd));
|
||||
}
|
||||
|
||||
static ExecutionEngine *EE = 0;
|
||||
@ -164,6 +179,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
builder.setMArch(MArch);
|
||||
builder.setMCPU(MCPU);
|
||||
builder.setMAttrs(MAttrs);
|
||||
builder.setRelocationModel(RelocModel);
|
||||
builder.setErrorStr(&ErrorMsg);
|
||||
builder.setEngineKind(ForceInterpreter
|
||||
? EngineKind::Interpreter
|
||||
|
Reference in New Issue
Block a user