Skip to content

Changing build.profiler forces an unnecessary rebuild of std #131812

Closed
@Zalathar

Description

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.profiler does 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)C-discussionCategory: Discussion or questions that doesn't represent real issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions