Rollup merge of #135126 - klensy:deprecated-and-do-nothing, r=jieyouxu

mark deprecated option as deprecated in rustc_session to remove copypasta and small refactor

This marks deprecated options as deprecated via flag in options table in rustc_session, which removes copypasted deprecation text from rustc_driver_impl.

This also adds warning for deprecated `-C ar` option, which didn't emitted any warnings before.
Makes `inline_threshold` `[UNTRACKED]`, as it do nothing.
Adds few tests.

See individual commits.
This commit is contained in:
Jacob Pratt 2025-01-06 22:04:17 -05:00 committed by GitHub
commit 44808ae798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 78 additions and 34 deletions

View file

@ -582,6 +582,7 @@ fn test_codegen_options_tracking_hash() {
untracked!(dlltool, Some(PathBuf::from("custom_dlltool.exe")));
untracked!(extra_filename, String::from("extra-filename"));
untracked!(incremental, Some(String::from("abc")));
untracked!(inline_threshold, Some(0xf007ba11));
// `link_arg` is omitted because it just forwards to `link_args`.
untracked!(link_args, vec![String::from("abc"), String::from("def")]);
untracked!(link_self_contained, LinkSelfContained::on());
@ -613,7 +614,6 @@ fn test_codegen_options_tracking_hash() {
tracked!(embed_bitcode, false);
tracked!(force_frame_pointers, FramePointer::Always);
tracked!(force_unwind_tables, Some(true));
tracked!(inline_threshold, Some(0xf007ba11));
tracked!(instrument_coverage, InstrumentCoverage::Yes);
tracked!(link_dead_code, Some(true));
tracked!(linker_plugin_lto, LinkerPluginLto::LinkerPluginAuto);