Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove target_override #122810

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Remove target_override #122810

merged 2 commits into from
Mar 21, 2024

Commits on Mar 21, 2024

  1. Remove CodegenBackend::target_override.

    Backend and target selection is a mess: the target can override the
    backend (via `Target::default_codegen_backend`), *and* the backend can
    override the target (via `CodegenBackend::target_override`).
    
    The code that handles this is ugly. It calls `build_target_config`
    twice, once before getting the backend and once again afterward. It also
    must check that both overrides aren't triggering at the same time.
    
    This commit removes the latter override. It's used in rust-gpu but
    @eddyb said via Zulip that removing it would be ok. This simplifies the
    code greatly, and will allow some nice follow-up refactorings.
    nnethercote committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    23ee523 View commit details
    Browse the repository at this point in the history
  2. Rename some target_cfg variables as target.

    Because the underlying type is called `Target`. (There is also a
    separate type called `TargetCfg`.)
    nnethercote committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    5744be2 View commit details
    Browse the repository at this point in the history