diff options
| author | bors <bors@rust-lang.org> | 2024-11-27 10:19:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-27 10:19:38 +0000 |
| commit | 39cb3386ddc6c71657418be28dbb3987eea4aa4b (patch) | |
| tree | d9dc869bd9dc664d264a9585d1e247fe07ae99ce /library/profiler_builtins | |
| parent | 5f8a2405a6a7ea0ff85072b3bf90f4cff1144e85 (diff) | |
| parent | 6798ecaf1000c223378151023b8eb37f3464af29 (diff) | |
| download | rust-39cb3386ddc6c71657418be28dbb3987eea4aa4b.tar.gz rust-39cb3386ddc6c71657418be28dbb3987eea4aa4b.zip | |
Auto merge of #133369 - Zalathar:profiler-builtins-no-core, r=jieyouxu
Allow injecting a profiler runtime into `#![no_core]` crates An alternative to #133300, allowing `-Cinstrument-coverage` to be used with `-Zbuild-std`. The incompatibility between `profiler_builtins` and `#![no_core]` crates appears to have been caused by profiler_builtins depending on core, and therefore conflicting with core (or minicore). But that's a false dependency, because the profiler doesn't contain any actual Rust code. So we can just mark the profiler itself as `#![no_core]`, and remove the incompatibility error. --- For context, the error was originally added by #79958.
Diffstat (limited to 'library/profiler_builtins')
| -rw-r--r-- | library/profiler_builtins/Cargo.toml | 2 | ||||
| -rw-r--r-- | library/profiler_builtins/src/lib.rs | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/library/profiler_builtins/Cargo.toml b/library/profiler_builtins/Cargo.toml index 9aadefce3b3..c601a41b433 100644 --- a/library/profiler_builtins/Cargo.toml +++ b/library/profiler_builtins/Cargo.toml @@ -9,8 +9,6 @@ bench = false doc = false [dependencies] -core = { path = "../core" } -compiler_builtins = { version = "0.1.0", features = ['rustc-dep-of-std'] } [build-dependencies] cc = "1.2" diff --git a/library/profiler_builtins/src/lib.rs b/library/profiler_builtins/src/lib.rs index ac685b18c29..a258f7d31a1 100644 --- a/library/profiler_builtins/src/lib.rs +++ b/library/profiler_builtins/src/lib.rs @@ -1,11 +1,15 @@ -#![no_std] +// tidy-alphabetical-start +#![allow(internal_features)] +#![feature(no_core)] #![feature(profiler_runtime)] +#![feature(staged_api)] +// tidy-alphabetical-end + +// Other attributes: +#![no_core] #![profiler_runtime] #![unstable( feature = "profiler_runtime_lib", reason = "internal implementation detail of rustc right now", issue = "none" )] -#![allow(unused_features)] -#![allow(internal_features)] -#![feature(staged_api)] |
