-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Rust platform triples should omit and ignore the vendor #1763
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
Comments
Ideally the rust triple wouldn't be examined at all except to locate our target config. That isn't quite the case (especially due to the move towards rustbuild using scanning the target triple a bit more to replace the platform cfg), but it's a decent goal to decouple meaning the triple from it's value (say no to triple parsing). That said, as soon as we admit that folks may have different configurations that aren't represented by There might be a place for providing documented rules for how rust target triples should be used/created in the future, though. |
@jmesmon Maybe |
I guess I'd be looking for a real problem that we're solving at that point:
|
Duplicate-ish of rust-lang/rust#33147 |
Currently, rust and cargo use the full platform identity for identifying platforms (
<arch>-<vendor>-<os>[-<libc]
).However, the
vendor
attribute in a platform identity (commonly known as platform triples) is a private attribute intended to indicate variants and configurations. For example, RH/Fedora based distros use<arch>-redhat-linux-gnu
for the platform identity, Mageia based ones use<arch>-mageia-linux-gnu
, and so on. However, for the purposes of determining platform equivalence, onlyarch
,os
, andlibc
matter.The tooling should be changed to ignore the
vendor
attribute and platforms should be similarly altered so that the platform triple should only contain the meaningful attributes.For example, instead of saying
x86_64-unknown-linux-gnu
, it would bex86_64-linux-gnu
. Alternatively, simply forcing thevendor
to always be considered something generic (likepc
) would be sufficient.The vendor attribute is meaningful to humans, but not tools.
The text was updated successfully, but these errors were encountered: