Open errantmind opened 3 years ago
This is not possible currently.
profiler_builtins
is no_std
crate, so it need a core
(the prebuilt one).
But rustc don't allow link two core
:
// Since libcore defines many fundamental lang items, all tests live in a
// separate crate, libcoretest, to avoid bizarre issues.
//
// Here we explicitly #[cfg]-out this whole crate when testing. If we don't do
// this, both the generated test artifact and the linked libtest (which
// transitively includes libcore) will both define the same set of lang items,
// and this will cause the E0152 "found duplicate lang item" error. See
// discussion in #50466 for details.
//
// This cfg won't affect doc tests.
Related PR: https://github.com/rust-lang/rust/pull/79958
Alright, thanks for the explanation. It would be helpful to have this feature at some point
When building with cargo, using -Z build-std, I cannot generate profiles for PGO
The build fails when it gets to the step where it (attempts to) build
core
: