"run the self profiler"),
profile_json: bool = (false, parse_bool, [UNTRACKED],
"output a json file with profiler results"),
+ emit_stack_sizes: bool = (false, parse_bool, [UNTRACKED],
+ "emits a section containing stack size metadata"),
}
pub fn default_lib_output() -> CrateType {
let features = CString::new(features).unwrap();
let is_pie_binary = !find_features && is_pie_binary(sess);
let trap_unreachable = sess.target.target.options.trap_unreachable;
+ let emit_stack_size_section = sess.opts.debugging_opts.emit_stack_sizes;
let asm_comments = sess.asm_comments();
trap_unreachable,
singlethread,
asm_comments,
+ emit_stack_size_section,
)
};
DataSections: bool,
TrapUnreachable: bool,
Singlethread: bool,
- AsmComments: bool)
+ AsmComments: bool,
+ EmitStackSizeSection: bool)
-> Option<&'static mut TargetMachine>;
pub fn LLVMRustDisposeTargetMachine(T: &'static mut TargetMachine);
pub fn LLVMRustAddAnalysisPasses(T: &'a TargetMachine, PM: &PassManager<'a>, M: &'a Module);
bool DataSections,
bool TrapUnreachable,
bool Singlethread,
- bool AsmComments) {
+ bool AsmComments,
+ bool EmitStackSizeSection) {
auto OptLevel = fromRust(RustOptLevel);
auto RM = fromRust(RustReloc);
}
#if LLVM_VERSION_GE(6, 0)
+ Options.EmitStackSizeSection = EmitStackSizeSection;
+
Optional<CodeModel::Model> CM;
#else
CodeModel::Model CM = CodeModel::Model::Default;