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

Infer the default host target from the host toolchain if possible #78513

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Oct 29, 2020

  • beta-x86_64-unknown-linux-gnu has beta stripped
  • rustc2 is ignored

This fixes ongoing issues where x.py will detect the wrong host triple
between MSVC and GNU.

I don't think this will break anyone's workflow - I'd be very surprised if you a) had no [build] section in config.toml, b) had rustc installed, and c) expected the default target to be something other than the default target used by rustc. But I could be wrong - I'm happy to hear user stories :)

Fixes #78150.

r? @Mark-Simulacrum
cc @Lokathor

@jyn514 jyn514 added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Oct 29, 2020
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2020
@jyn514
Copy link
Member Author

jyn514 commented Oct 29, 2020

Also, @Emerentius can you confirm whether rustup default mentions MSVC for you?

@jyn514 jyn514 force-pushed the rustup-toolchain branch 4 times, most recently from 3357bc9 to 5ff44af Compare October 29, 2020 13:35
@jyn514 jyn514 changed the title Infer the default host target from rustup if possible Infer the default host target from the host toolchain if possible Oct 29, 2020
@Emerentius
Copy link
Contributor

@jyn514 yes, it does and so does rustc --version --verbose

@Mark-Simulacrum
Copy link
Member

I think since it could change your build in a subtle way, we should note this in the changelog.

r=me with that.

This fixes ongoing issues where x.py will detect the wrong host triple
between MSVC and GNU.

- Add line to changelog
@jyn514
Copy link
Member Author

jyn514 commented Nov 5, 2020

@bors r=@Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Nov 5, 2020

📌 Commit 3863dee has been approved by Mark-Simulacrum

@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 Nov 5, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Nov 6, 2020
…ulacrum

Infer the default host target from the host toolchain if possible

- `beta-x86_64-unknown-linux-gnu` has beta stripped
- `rustc2` is ignored

This fixes ongoing issues where x.py will detect the wrong host triple
between MSVC and GNU.

I don't think this will break anyone's workflow - I'd be very surprised if you a) had no `[build]` section in `config.toml`, b) had rustc installed, and c) expected the default target to be something other than the default target used by `rustc`. But I could be wrong - I'm happy to hear user stories :)

Fixes rust-lang#78150.

r? `@Mark-Simulacrum`
cc `@Lokathor`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 10, 2020
Rollup of 12 pull requests

Successful merges:

 - rust-lang#74754 (Add `#[cfg(panic = '...')]`)
 - rust-lang#76468 (Improve lifetime name annotations for closures & async functions)
 - rust-lang#77016 (Test clippy on PR CI on changes)
 - rust-lang#78480 (BTreeMap: fix pointer provenance rules)
 - rust-lang#78502 (Update Chalk to 0.36.0)
 - rust-lang#78513 (Infer the default host target from the host toolchain if possible)
 - rust-lang#78566 (Enable LLVM Polly via llvm-args.)
 - rust-lang#78580 (inliner: Break inlining cycles)
 - rust-lang#78710 (rustc_ast: Do not panic by default when visiting macro calls)
 - rust-lang#78746 (Demote i686-unknown-freebsd to tier 2 compiler target)
 - rust-lang#78830 (fix `super_visit_with` for `Terminator`)
 - rust-lang#78844 (Monomorphize a type argument of size-of operation during codegen)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 62d3a4f into rust-lang:master Nov 10, 2020
@rustbot rustbot added this to the 1.49.0 milestone Nov 10, 2020
@jyn514 jyn514 deleted the rustup-toolchain branch November 10, 2020 14:24
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 13, 2020
Fix rustup support in default_build_triple for python3

bootstrap completely ignores all errors when detecting a rustup version,
so this wasn't noticed before.

Fixes the following error:

```
rustup not detected: a bytes-like object is required, not 'str'
falling back to auto-detect
```

This also takes the opportunity to only call rustup and other external
commands only once during startup.

Follow-up to rust-lang#78513.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Git pre-commit hook for tidy check uses GNU toolchain on windows by default
6 participants