From 056942215cf8dc39686fa80e42b4e73657d4fed5 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 26 Oct 2020 20:55:07 +0100 Subject: Implement -Z function-sections=yes|no This lets rustc users tweak whether all functions should be put in their own TEXT section, using whatever default value the target defines if the flag is missing. --- compiler/rustc_session/src/options.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index dd22889ddec..750f2e19ee2 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -904,6 +904,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "force all crates to be `rustc_private` unstable (default: no)"), fuel: Option<(String, u64)> = (None, parse_optimization_fuel, [TRACKED], "set the optimization fuel quota for a crate"), + function_sections: Option = (None, parse_opt_bool, [TRACKED], + "whether each function should go in its own section"), graphviz_dark_mode: bool = (false, parse_bool, [UNTRACKED], "use dark-themed colors in graphviz output (default: no)"), graphviz_font: String = ("Courier, monospace".to_string(), parse_string, [UNTRACKED], -- cgit 1.4.1-3-g733a5