-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add --print host-triple
to print host target triple
#125579
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
People often parse `-vV` output to get to the host triple, which is annoying to do. It's easier to just get it directly. I called it "host-triple" instead of "host" because it's clearer that it's just the target name.
I would prefer |
Cargo also does this. |
@rfcbot merge |
Team member @oli-obk has proposed to merge this. The next step is review by the rest of the tagged team members:
Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
@rfcbot concern triple vs tuple |
As a data point, our existing documentation seem to call it "triple" pretty consistently: |
This comment was marked as resolved.
This comment was marked as resolved.
So, should that be "tuple" or "triple"? (trying to understand if the concern raised is still standing) |
I personally don't have a strong opinion here and would be open to rescind my concern
https://doc.rust-lang.org/rustc/platform-support/loongarch-linux.html?highlight=tuple#loongarch-unknown-linux- already uses tuple @michaelwoerister @workingjubilee does one of you care strongly about either option? It is fairly arbitrary in the end (and its documentation should probably mention the alternative). One simple way to resolve this might just be a vote on zulip and we pick whatever ends up on top as long as nobody feels very strongly about this: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.60--print.20host.5B-tuple.7C-triple.5D.60 |
I voted "don't care" on Zulip. |
r? compiler |
I don't think there's necessarily a strong consensus from the Zulip poll on terminology here, the team seems to have a slight preference towards |
People often parse
-vV
output to get to the host triple, which is annoying to do. It's easier to just get it directly.I called it "host-triple" instead of "host" because it's clearer that it's just the target name. I'm open to different names, but I think this one is fine.
a quick GitHub search for
'^host
reveals many instances of people doing the parsing, for example:https://github.com/japaric/xargo/blob/68e0ca57cd90837fe02f262f074182f9cfeb6227/README.md?plain=1#L369
https://github.com/taiki-e/setup-cross-toolchain-action/blob/0e38473b0c562d6db19a98d3ec20a80f7ac189ae/main.sh#L96
https://github.com/taiki-e/cargo-llvm-cov/blob/8a3553b86551eabf9c30c060b1f72a5bbccb98c6/README.md?plain=1#L625
https://github.com/SiliconLabs/cpc-nvm3/blob/43f3ec39709b30700ef7f39d91fa647974323bf1/do.sh#L35
needs a compiler FCP. I could also do an MCP but I think just an FCP here makes the most sense.