Skip to content

Commit 36068ca

Browse files
author
bogon-right
committed
Remove profiler_builtins crate
1 parent e74143e commit 36068ca

File tree

18 files changed

+16
-154
lines changed

18 files changed

+16
-154
lines changed

Cargo.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,13 +2736,6 @@ dependencies = [
27362736
"std",
27372737
]
27382738

2739-
[[package]]
2740-
name = "profiler_builtins"
2741-
version = "0.0.0"
2742-
dependencies = [
2743-
"cc",
2744-
]
2745-
27462739
[[package]]
27472740
name = "psm"
27482741
version = "0.1.16"
@@ -4682,7 +4675,6 @@ dependencies = [
46824675
"object 0.26.2",
46834676
"panic_abort",
46844677
"panic_unwind",
4685-
"profiler_builtins",
46864678
"rand 0.7.3",
46874679
"rustc-demangle",
46884680
"std_detect",

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
578578
),
579579
gated!(
580580
profiler_runtime, Normal, template!(Word), WarnFollowing,
581-
"the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate \
581+
"the `#[profiler_runtime]` attribute is used to identify the crate \
582582
which contains the profiler runtime and will never be stable",
583583
),
584584

compiler/rustc_metadata/src/creader.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,7 @@ impl<'a> CrateLoader<'a> {
764764
|| !(self.sess.instrument_coverage()
765765
|| self.sess.opts.unstable_opts.profile
766766
|| self.sess.opts.cg.profile_generate.enabled())
767+
|| self.sess.opts.unstable_opts.profiler_runtime == "profiler_builtins"
767768
{
768769
return;
769770
}

compiler/rustc_metadata/src/rmeta/decoder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,6 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
15091509
"proc_macro",
15101510
"panic_abort",
15111511
"panic_unwind",
1512-
"profiler_builtins",
15131512
"rtstartup",
15141513
"rustc-std-workspace-core",
15151514
"rustc-std-workspace-alloc",

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ options! {
14231423
no_parallel_llvm: bool = (false, parse_no_flag, [UNTRACKED],
14241424
"run LLVM in non-parallel mode (while keeping codegen-units and ThinLTO)"),
14251425
no_profiler_runtime: bool = (false, parse_no_flag, [TRACKED],
1426-
"prevent automatic injection of the profiler_builtins crate"),
1426+
"prevent automatic injection of the profiler runtime"),
14271427
no_unique_section_names: bool = (false, parse_bool, [TRACKED],
14281428
"do not use unique names for text and data sections when -Z function-sections is used"),
14291429
normalize_docs: bool = (false, parse_bool, [TRACKED],

library/profiler_builtins/Cargo.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

library/profiler_builtins/build.rs

Lines changed: 0 additions & 89 deletions
This file was deleted.

library/profiler_builtins/src/lib.rs

Lines changed: 0 additions & 8 deletions
This file was deleted.

library/std/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ panic_abort = { path = "../panic_abort" }
1717
core = { path = "../core" }
1818
libc = { version = "0.2.126", default-features = false, features = ['rustc-dep-of-std'] }
1919
compiler_builtins = { version = "0.1.73" }
20-
profiler_builtins = { path = "../profiler_builtins", optional = true }
2120
unwind = { path = "../unwind" }
2221
hashbrown = { version = "0.12", default-features = false, features = ['rustc-dep-of-std'] }
2322
std_detect = { path = "../stdarch/crates/std_detect", default-features = false, features = ['rustc-dep-of-std'] }
@@ -57,7 +56,7 @@ backtrace = [
5756
gimli-symbolize = []
5857

5958
panic-unwind = ["panic_unwind"]
60-
profiler = ["profiler_builtins"]
59+
profiler = []
6160
compiler-builtins-c = ["alloc/compiler-builtins-c"]
6261
compiler-builtins-mem = ["alloc/compiler-builtins-mem"]
6362
compiler-builtins-no-asm = ["alloc/compiler-builtins-no-asm"]

src/bootstrap/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ impl<'a> ShouldRun<'a> {
406406
/// `all_krates` should probably be removed at some point.
407407
pub fn all_krates(mut self, name: &str) -> Self {
408408
let mut set = BTreeSet::new();
409-
for krate in self.builder.in_tree_crates(name, None) {
409+
for krate in self.builder.in_tree_crates(name) {
410410
let path = krate.local_path(self.builder);
411411
set.insert(TaskPath { path, kind: Some(self.kind) });
412412
}
@@ -419,7 +419,7 @@ impl<'a> ShouldRun<'a> {
419419
///
420420
/// `make_run` will be called a single time with all matching command-line paths.
421421
pub fn crate_or_deps(self, name: &str) -> Self {
422-
let crates = self.builder.in_tree_crates(name, None);
422+
let crates = self.builder.in_tree_crates(name);
423423
self.crates(crates)
424424
}
425425

0 commit comments

Comments
 (0)