Skip to content

The build prefix is part of the compiled compiler #82392

Closed
@bjorn3

Description

@bjorn3

This build prefix is incorrect when using rustup as rustup can install it everywhere. In addition it hurts reproducibility of builds.

let install_prefix = option_env!("CFG_PREFIX").expect("CFG_PREFIX");

Once this is no longer hard coded, the following line should be removed to prevent accidentally depending on it:

.env("CFG_PREFIX", builder.config.prefix.clone().unwrap_or_default());

I noticed this as I forgot to set the prefix and when I set it, it started rebuilding from rustc_codegen_ssa onward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-reproducibilityArea: Reproducible / deterministic buildsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions