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

rustc is unable to build for vendored toolchains by default #41402

Closed
zachreizner opened this issue Apr 19, 2017 · 4 comments
Closed

rustc is unable to build for vendored toolchains by default #41402

zachreizner opened this issue Apr 19, 2017 · 4 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@zachreizner
Copy link
Contributor

When rustc is given a target triple to compile for, the behavior, as defined by librustc_back, is to search the list of builtins for an exact match and then to search for the target triple as a file or a json configuration in some search directories. In every case, the target triple is treated as an opaque key to be searched for, contrary to the usual usage of a target triple.

The usual way is to parse the triple into its semantic parts (arch-vendor-system or arch-vendor-kernel-system) and use those parts to build up a target specification (i.e. a struct Target from librustc_back). The consequence of this deviation is that vendored toolchains (toolchains that have something other than a "default" vendor in their triple) won't be recognized by rustc, contrary to the purpose of having a vendor string, which is to allow vendors to use arbitrary toolchains.

The current workaround is either to explicitly add the needed vendor triple to rustc's list of builtins (which requires official support to get into master) or to add a TRIPLE.json to the appropriate path. Granted, these workaround are not onerous, but I believe the "right" way would be to handle the target triples properly by default. I'm putting this issue up for discussion.

@codyps
Copy link
Contributor

codyps commented Apr 19, 2017

Related (but not quite the same): #33147

@Mark-Simulacrum Mark-Simulacrum added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 21, 2017
@metux
Copy link

metux commented Jul 12, 2017

Just curios: which vendor toolchains are you using ?

@zachreizner
Copy link
Contributor Author

The toolchain's vendor string is "cros" as in "Chrome OS".

@Mark-Simulacrum Mark-Simulacrum added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jul 27, 2017
@jackh726
Copy link
Member

Closing as duplicate of #33147

@jackh726 jackh726 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants