From c78cb04d6420d0d04e7114e7f8ba4c165ada5ac9 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Thu, 23 Jan 2025 12:59:04 +0800 Subject: [PATCH] feat: strip dead code by default Signed-off-by: Xuanwo --- src/options.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/options.rs b/src/options.rs index 50b3d92..3c7e224 100644 --- a/src/options.rs +++ b/src/options.rs @@ -116,9 +116,10 @@ pub struct BuildOptions { /// the coverage option will be disabled). pub coverage: bool, - /// Dead code is linked by default to prevent a potential error with some - /// optimized targets. This flag allows you to opt out of it. - #[arg(long)] + /// Dead code is stripped by default. + /// This flag allows you to opt out and always include dead code. + /// Please note, this could trigger unexpected behavior or even ICEs in the compiler. + #[arg(long, default_value_t = true)] pub strip_dead_code: bool, /// By default the 'cfg(fuzzing)' compilation configuration is set. This flag @@ -275,7 +276,7 @@ mod test { unstable_flags: Vec::new(), target_dir: None, coverage: false, - strip_dead_code: false, + strip_dead_code: true, no_cfg_fuzzing: false, no_trace_compares: false, disable_branch_folding: None,