Skip to content

Commit e87c4dd

Browse files
committed
Auto merge of #84226 - Aaron1011:track-link-dead-code, r=Mark-Simulacrum
Track `-C link-dead-code` during incremental compilation This option influences monomorphization, which participates in incremental compilation.
2 parents 7af1f55 + 1ce1cda commit e87c4dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ fn test_codegen_options_tracking_hash() {
405405
untracked!(incremental, Some(String::from("abc")));
406406
// `link_arg` is omitted because it just forwards to `link_args`.
407407
untracked!(link_args, vec![String::from("abc"), String::from("def")]);
408-
untracked!(link_dead_code, Some(true));
409408
untracked!(link_self_contained, Some(true));
410409
untracked!(linker, Some(PathBuf::from("linker")));
411410
untracked!(linker_flavor, Some(LinkerFlavor::Gcc));
@@ -433,6 +432,7 @@ fn test_codegen_options_tracking_hash() {
433432
tracked!(force_unwind_tables, Some(true));
434433
tracked!(inline_threshold, Some(0xf007ba11));
435434
tracked!(linker_plugin_lto, LinkerPluginLto::LinkerPluginAuto);
435+
tracked!(link_dead_code, Some(true));
436436
tracked!(llvm_args, vec![String::from("1"), String::from("2")]);
437437
tracked!(lto, LtoCli::Fat);
438438
tracked!(metadata, vec![String::from("A"), String::from("B")]);

compiler/rustc_session/src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
814814
"a single extra argument to append to the linker invocation (can be used several times)"),
815815
link_args: Vec<String> = (Vec::new(), parse_list, [UNTRACKED],
816816
"extra arguments to append to the linker invocation (space separated)"),
817-
link_dead_code: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
817+
link_dead_code: Option<bool> = (None, parse_opt_bool, [TRACKED],
818818
"keep dead code at link time (useful for code coverage) (default: no)"),
819819
link_self_contained: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
820820
"control whether to link Rust provided C objects/libraries or rely

0 commit comments

Comments
 (0)