Configure LLVM module PIC level
As of LLVM 9, this is required for 32-bit PowerPC to properly generate PLT references. Previously, only BigPIC was supported; now LLVM supports both BigPIC and SmallPIC, and there is no default value provided.
This commit is contained in:
parent
91fd6283e6
commit
1943079361
3 changed files with 9 additions and 0 deletions
|
@ -754,6 +754,10 @@ LLVMRustSetDataLayoutFromTargetMachine(LLVMModuleRef Module,
|
|||
unwrap(Module)->setDataLayout(Target->createDataLayout());
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustSetModulePICLevel(LLVMModuleRef M) {
|
||||
unwrap(M)->setPICLevel(PICLevel::Level::BigPIC);
|
||||
}
|
||||
|
||||
extern "C" void LLVMRustSetModulePIELevel(LLVMModuleRef M) {
|
||||
unwrap(M)->setPIELevel(PIELevel::Level::Large);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue