Slightly refactor TargetSelection in bootstrap by Kobzol · Pull Request #128983 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation8 Commits2 Checks6 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Kobzol

Mostly a drive-by refactoring of TargetSelection to reduce some manual "windows-gnu" detection and also accesses to the triple field.

r? @onur-ozkan

@rustbot

This PR modifies src/bootstrap/src/core/config.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@rustbot rustbot added the T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

label

Aug 11, 2024

onur-ozkan

@onur-ozkan

Feel free to r=me once rebased.

@Kobzol

@Kobzol

@Kobzol

@bors

📌 Commit 1c0c2c3 has been approved by onur-ozkan

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Aug 13, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Aug 13, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Aug 13, 2024

@rust-timer

Rollup merge of rust-lang#128983 - Kobzol:bootstrap-target, r=onur-ozkan

Slightly refactor TargetSelection in bootstrap

Mostly a drive-by refactoring of TargetSelection to reduce some manual "windows-gnu" detection and also accesses to the triple field.

r? @onur-ozkan

@Kobzol Kobzol deleted the bootstrap-target branch

August 13, 2024 14:42

@ColinFinck

@Kobzol I stumbled upon this PR as it conflicted with my #128876

Looking more into it, we now join target to the path in some places and target.triple in other places.
target implements Display and outputs target.triple there, but in the case that target.file is set, it also outputs the file name in parentheses. Is this really what we want? Don't we want to use target.triple everywhere?

@Kobzol

I tried to only replace situations where the target was joined as a path, so that the AsRef<Path> implementation is used. If I also replaced target.triple with target somewhere where Display is used, that's a bug! Did you find any such case?

@Kobzol

@Kobzol

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Aug 13, 2024

@matthiaskrgr

…zkan

Fix one usage of target triple in bootstrap

This bug was introduced in rust-lang#128983. In this one case, the TargetSelection was also used as Display (not just as Path), which I did not notice in the original PR. If the target contained a custom file, it would be included in its Display formatting, even though only the triple should be used.

Found [here](rust-lang#128983 (comment)).

r? @onur-ozkan

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Aug 14, 2024

@rust-timer

Rollup merge of rust-lang#129056 - Kobzol:fix-target-triple, r=onur-ozkan

Fix one usage of target triple in bootstrap

This bug was introduced in rust-lang#128983. In this one case, the TargetSelection was also used as Display (not just as Path), which I did not notice in the original PR. If the target contained a custom file, it would be included in its Display formatting, even though only the triple should be used.

Found [here](rust-lang#128983 (comment)).

r? @onur-ozkan

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-bootstrap

Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)