You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changing build.profiler forces an unnecessary rebuild of std #131812
In theory, opening config.toml and toggling build.profiler between false and true should be cheap. Setting it to true should cause the profiler runtime to be built, without rebuilding std. And setting it to false should simply cause the rest of the build to pretend that any previously-built compiler runtime doesn't exist.
In practice, toggling build.profilerdoes trigger a rebuild of std, which also naturally triggers a rebuild of the compiler.
I think this is an artifact of library/profiler_runtime being considered an optional dependency of std. And I think that is just an artifact of how the profiler runtime was originally added (#42433), not something that inherently has to be true.
Of course, the tricky part will be fixing this without accidentally breaking anything.
I think bootstrap itself is behaving correctly here, in that if the profiler runtime really were a dependency of std, then enabling it should trigger a std rebuild.
So it's more of a questionable configuration, in that it really shouldn't be a dependency.
Also, toggling the profiler off/on is presumably not very common, especially now that the profiler can be built without the src/llvm-project submodule (#129295). So this should be a pretty low priority relative to its difficulty.
Activity
Zalathar commentedon Oct 17, 2024
I think bootstrap itself is behaving correctly here, in that if the profiler runtime really were a dependency of std, then enabling it should trigger a std rebuild.
So it's more of a questionable configuration, in that it really shouldn't be a dependency.
Also, toggling the profiler off/on is presumably not very common, especially now that the profiler can be built without the
src/llvm-projectsubmodule (#129295). So this should be a pretty low priority relative to its difficulty.onur-ozkan commentedon Oct 17, 2024
Additional note: "profiler" feature can still be enabled on
stdthrough this option:rust/config.example.toml
Line 770 in 798fb83
build.profilerlogic.Zalathar commentedon Oct 17, 2024
I looked into this briefly, and the fix turns out to have been simpler than I was expecting (fingers crossed), so I've filed #131816.
Auto merge of rust-lang#131816 - Zalathar:profiler-feature, r=<try>
Auto merge of rust-lang#131816 - Zalathar:profiler-feature, r=Kobzol