about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-11-01 21:49:15 +0000
committerbors <bors@rust-lang.org>2024-11-01 21:49:15 +0000
commit7c7bb7dc017545db732f5cffec684bbaeae0a9a0 (patch)
tree4b759b4f7ab6c0ed78607950af67edbb169d342e /compiler/rustc_session
parent705cfe0e966399e061d64dd3661bfbc57553ed87 (diff)
parent305ca05cbe1015f7841427a5c014b435ce7319ce (diff)
downloadrust-7c7bb7dc017545db732f5cffec684bbaeae0a9a0.tar.gz
rust-7c7bb7dc017545db732f5cffec684bbaeae0a9a0.zip
Auto merge of #132470 - GuillaumeGomez:rollup-1a1mkmp, r=GuillaumeGomez
Rollup of 14 pull requests

Successful merges:

 - #131829 (Remove support for `-Zprofile` (gcov-style coverage instrumentation))
 - #132369 (style-guide: Only use the new binop heuristic for assignments)
 - #132383 (Implement suggestion for never type fallback lints)
 - #132413 (update offset_of! docs to reflect the stabilization of nesting)
 - #132438 (Remove unncessary option for default rust-analyzer setting)
 - #132439 (Add `f16` and `f128` to `invalid_nan_comparison`)
 - #132444 (rustdoc: Directly use rustc_abi instead of reexports)
 - #132445 (Cleanup attributes around unchecked shifts and unchecked negation in const)
 - #132448 (Add missing backtick)
 - #132450 (Show actual MIR when MIR building forgot to terminate block)
 - #132451 (remove some unnecessary rustc_allow_const_fn_unstable)
 - #132455 (make const_alloc_layout feature gate only about functions that are already stable)
 - #132456 (Move remaining inline assembly test files into asm directory)
 - #132459 (feat(byte_sub_ptr): unstably add ptr::byte_sub_ptr)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/config.rs14
-rw-r--r--compiler/rustc_session/src/options.rs5
2 files changed, 1 insertions, 18 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index d733e32f209..5ee3b4015eb 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -2453,7 +2453,7 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
     let output_types = parse_output_types(early_dcx, &unstable_opts, matches);
 
     let mut cg = CodegenOptions::build(early_dcx, matches);
-    let (disable_local_thinlto, mut codegen_units) = should_override_cgus_and_disable_thinlto(
+    let (disable_local_thinlto, codegen_units) = should_override_cgus_and_disable_thinlto(
         early_dcx,
         &output_types,
         matches,
@@ -2476,18 +2476,6 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
 
     let assert_incr_state = parse_assert_incr_state(early_dcx, &unstable_opts.assert_incr_state);
 
-    if unstable_opts.profile && incremental.is_some() {
-        early_dcx.early_fatal("can't instrument with gcov profiling when compiling incrementally");
-    }
-    if unstable_opts.profile {
-        match codegen_units {
-            Some(1) => {}
-            None => codegen_units = Some(1),
-            Some(_) => early_dcx
-                .early_fatal("can't instrument with gcov profiling with multiple codegen units"),
-        }
-    }
-
     if cg.profile_generate.enabled() && cg.profile_use.is_some() {
         early_dcx.early_fatal("options `-C profile-generate` and `-C profile-use` are exclusive");
     }
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index 54a4621db24..2b158627751 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1985,13 +1985,8 @@ options! {
     proc_macro_execution_strategy: ProcMacroExecutionStrategy = (ProcMacroExecutionStrategy::SameThread,
         parse_proc_macro_execution_strategy, [UNTRACKED],
         "how to run proc-macro code (default: same-thread)"),
-    profile: bool = (false, parse_bool, [TRACKED],
-        "insert profiling code (default: no)"),
     profile_closures: bool = (false, parse_no_flag, [UNTRACKED],
         "profile size of closures"),
-    profile_emit: Option<PathBuf> = (None, parse_opt_pathbuf, [TRACKED],
-        "file path to emit profiling data at runtime when using 'profile' \
-        (default based on relative source path)"),
     profile_sample_use: Option<PathBuf> = (None, parse_opt_pathbuf, [TRACKED],
         "use the given `.prof` file for sampled profile-guided optimization (also known as AutoFDO)"),
     profiler_runtime: String = (String::from("profiler_builtins"), parse_string, [TRACKED],