Skip to content

Commit

Permalink
Auto merge of #84226 - Aaron1011:track-link-dead-code, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Track `-C link-dead-code` during incremental compilation

This option influences monomorphization, which participates in
incremental compilation.
  • Loading branch information
bors committed Apr 16, 2021
2 parents 7af1f55 + 1ce1cda commit e87c4dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ fn test_codegen_options_tracking_hash() {
untracked!(incremental, Some(String::from("abc")));
// `link_arg` is omitted because it just forwards to `link_args`.
untracked!(link_args, vec![String::from("abc"), String::from("def")]);
untracked!(link_dead_code, Some(true));
untracked!(link_self_contained, Some(true));
untracked!(linker, Some(PathBuf::from("linker")));
untracked!(linker_flavor, Some(LinkerFlavor::Gcc));
Expand Down Expand Up @@ -433,6 +432,7 @@ fn test_codegen_options_tracking_hash() {
tracked!(force_unwind_tables, Some(true));
tracked!(inline_threshold, Some(0xf007ba11));
tracked!(linker_plugin_lto, LinkerPluginLto::LinkerPluginAuto);
tracked!(link_dead_code, Some(true));
tracked!(llvm_args, vec![String::from("1"), String::from("2")]);
tracked!(lto, LtoCli::Fat);
tracked!(metadata, vec![String::from("A"), String::from("B")]);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
"a single extra argument to append to the linker invocation (can be used several times)"),
link_args: Vec<String> = (Vec::new(), parse_list, [UNTRACKED],
"extra arguments to append to the linker invocation (space separated)"),
link_dead_code: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
link_dead_code: Option<bool> = (None, parse_opt_bool, [TRACKED],
"keep dead code at link time (useful for code coverage) (default: no)"),
link_self_contained: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
"control whether to link Rust provided C objects/libraries or rely
Expand Down

0 comments on commit e87c4dd

Please sign in to comment.