mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Teach llvm-lto to respect the given RelocModel.
Patch by Nick Tomlinson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206177 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -83,7 +83,20 @@ int main(int argc, char **argv) {
|
||||
|
||||
LTOCodeGenerator CodeGen;
|
||||
|
||||
CodeGen.setCodePICModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC);
|
||||
switch (RelocModel) {
|
||||
case Reloc::Static:
|
||||
CodeGen.setCodePICModel(LTO_CODEGEN_PIC_MODEL_STATIC);
|
||||
break;
|
||||
case Reloc::PIC_:
|
||||
CodeGen.setCodePICModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC);
|
||||
break;
|
||||
case Reloc::DynamicNoPIC:
|
||||
CodeGen.setCodePICModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC);
|
||||
break;
|
||||
default:
|
||||
CodeGen.setCodePICModel(LTO_CODEGEN_PIC_MODEL_DEFAULT);
|
||||
}
|
||||
|
||||
CodeGen.setDebugInfo(LTO_DEBUG_MODEL_DWARF);
|
||||
CodeGen.setTargetOptions(Options);
|
||||
|
||||
|
Reference in New Issue
Block a user