};
let use_softfp = sess.opts.debugging_opts & session::USE_SOFTFP != 0;
+ // FIXME: #11906: Omitting frame pointers breaks retrieving the value of a parameter.
+ let no_fp_elim = sess.opts.debuginfo;
+
let tm = sess.targ_cfg.target_strs.target_triple.with_c_str(|T| {
sess.opts.target_cpu.with_c_str(|CPU| {
sess.opts.target_feature.with_c_str(|Features| {
lib::llvm::RelocPIC,
OptLevel,
true,
- use_softfp
+ use_softfp,
+ no_fp_elim
)
})
})
Reloc: RelocMode,
Level: CodeGenOptLevel,
EnableSegstk: bool,
- UseSoftFP: bool) -> TargetMachineRef;
+ UseSoftFP: bool,
+ NoFramePointerElim: bool) -> TargetMachineRef;
pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef,
PM: PassManagerRef,
Reloc::Model RM,
CodeGenOpt::Level OptLevel,
bool EnableSegmentedStacks,
- bool UseSoftFloat) {
+ bool UseSoftFloat,
+ bool NoFramePointerElim) {
std::string Error;
Triple Trip(Triple::normalize(triple));
const llvm::Target *TheTarget = TargetRegistry::lookupTarget(Trip.getTriple(),
}
TargetOptions Options;
- Options.NoFramePointerElim = true;
+ Options.NoFramePointerElim = NoFramePointerElim;
Options.EnableSegmentedStacks = EnableSegmentedStacks;
Options.FloatABIType = FloatABI::Default;
Options.UseSoftFloat = UseSoftFloat;