We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5dc660b + 99941cd commit b7bfb21Copy full SHA for b7bfb21
src/base.rs
@@ -85,6 +85,12 @@ pub fn compile_codegen_unit<'tcx>(tcx: TyCtxt<'tcx>, cgu_name: Symbol) -> (Modul
85
context.add_command_line_option("-fno-semantic-interposition");
86
// NOTE: Rust relies on LLVM not doing TBAA (https://github.com/rust-lang/unsafe-code-guidelines/issues/292).
87
context.add_command_line_option("-fno-strict-aliasing");
88
+
89
+ if tcx.sess.opts.debugging_opts.function_sections.unwrap_or(tcx.sess.target.function_sections) {
90
+ context.add_command_line_option("-ffunction-sections");
91
+ context.add_command_line_option("-fdata-sections");
92
+ }
93
94
if env::var("CG_GCCJIT_DUMP_CODE").as_deref() == Ok("1") {
95
context.set_dump_code_on_compile(true);
96
}
0 commit comments