Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: strip dead code by default #394

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading