Skip to content

Commit

Permalink
Merge pull request #394 from Xuanwo/strip-dead-code-by-default
Browse files Browse the repository at this point in the history
feat: strip dead code by default
  • Loading branch information
Manishearth authored Jan 23, 2025
2 parents d1d5bc6 + c78cb04 commit 95f7737
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 95f7737

Please sign in to comment.