mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 15:43:24 +03:00
[LLVM-3.9] Configure PIE at the module level instead of compilation unit level
This was deleted here[1] which appears to be replaced by this[2] which is a new setPIELevel function on the LLVM module itself. [1]: http://reviews.llvm.org/D19753 [2]: http://reviews.llvm.org/D19671
This commit is contained in:
@@ -188,7 +188,10 @@ LLVMRustCreateTargetMachine(const char *triple,
|
||||
}
|
||||
|
||||
TargetOptions Options;
|
||||
#if LLVM_VERSION_MINOR <= 8
|
||||
Options.PositionIndependentExecutable = PositionIndependentExecutable;
|
||||
#endif
|
||||
|
||||
Options.FloatABIType = FloatABI::Default;
|
||||
if (UseSoftFloat) {
|
||||
Options.FloatABIType = FloatABI::Soft;
|
||||
@@ -411,3 +414,10 @@ extern "C" LLVMTargetDataRef
|
||||
LLVMRustGetModuleDataLayout(LLVMModuleRef M) {
|
||||
return wrap(&unwrap(M)->getDataLayout());
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
LLVMRustSetModulePIELevel(LLVMModuleRef M) {
|
||||
#if LLVM_VERSION_MINOR >= 9
|
||||
unwrap(M)->setPIELevel(PIELevel::Level::Default);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user