1
Fork 0

optimize position independent code in executables

Position independent code has fewer requirements in executables, so pass
the appropriate flag to LLVM in order to allow more optimization. At the
moment this means faster thread-local storage.
This commit is contained in:
Daniel Micay 2014-08-09 12:43:45 -04:00
parent 86509d8d7a
commit 4deb4bcba5
3 changed files with 9 additions and 2 deletions

View file

@ -353,6 +353,7 @@ pub enum CodeGenOptLevel {
CodeGenLevelAggressive = 3,
}
#[deriving(PartialEq)]
#[repr(C)]
pub enum RelocMode {
RelocDefault = 0,
@ -1907,6 +1908,7 @@ extern {
EnableSegstk: bool,
UseSoftFP: bool,
NoFramePointerElim: bool,
PositionIndependentExecutable: bool,
FunctionSections: bool,
DataSections: bool) -> TargetMachineRef;
pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);