Make profiler_builtins
an optional dependency of sysroot, not std
#131816
+4
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This avoids unnecessary rebuilds of std (and the compiler) when
build.profiler
is toggled off or on.Fixes #131812.
Background: The
profiler_builtins
crate has been an optional dependency of std (behind a cargo feature) ever since it was added back in #42433. But as far as I can tell that has only ever been a convenient way to force the crate to be built, not a genuine dependency.The side-effect of this false dependency is that toggling
build.profiler
causes a rebuild of std and the compiler, which shouldn't be necessary. This PR therefore makesprofiler_builtins
an optional dependency of the dummy sysroot crate (#108865), rather than a dependency of std.What makes this change so small is that all of the necessary infrastructure already exists. Previously, bootstrap would enable the
profiler
feature on the sysroot crate, which would forward that feature to std. Now, enabling that feature directly enables sysroot'sprofiler_builtins
dependency instead.I believe this is more of a bootstrap change than a libs change, so tentatively:
r? bootstrap