I just ran rustup target list
and saw both x86_64-pc-solaris
and x86_64-sun-solaris
in the output. What's the difference between those targets?
According to this PR they are are two names for the same build:
rust-lang:master
← kulikjak:fix-solaris-target
opened 11:10AM - 17 Feb 21 UTC
This change makes `x86_64-pc-solaris` the default compilation target for x86-64 … Solaris/Illumos (based on [this exchange](https://github.com/rust-lang/rust/issues/68214#issuecomment-748042054) with @varkor).
I tried several ways of doing this (leveraging the alias support added with #61761 and improved/fixed with #80073) and found out that cross-compilation to the new one is by far the simplest way of doing this. It can be achieved by adding the following arguments: `--build x86_64-sun-solaris --host x86_64-pc-solaris --target x86_64-pc-solaris` and enabling the cross compilation with `PKG_CONFIG_ALLOW_CROSS=1` environment variable.
I also removed alias support altogether - `x86_64-pc-solaris` and `x86_64-sun-solaris` are now two separate targets. The problem with aliases is that even if rust internally knows that two are the same, other tools building with rust don't know that, resulting in build issues like the one with firefox mentioned [here](https://github.com/rust-lang/rust/issues/68214#issuecomment-746144229). I think that once the dust settles and `x86_64-pc-solaris` becomes the default, `x86_64-sun-solaris` can be removed.
If you agree with the above, I have two subsequent questions:
1. Is there a preferred way to display deprecation warnings when `x86_64-sun-solaris` is passed into the compiler as an argument? I am not sure whether target deprecation was done before.
2. Where would be the best way to document this change for those using rust on Solaris? Without the cross-compilation arguments (used once to build a new version), the build won't work. Should I add it into [RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md)?
Thanks!
I gather x86_64-pc-solaris
is preferred and x86_64-sun-solaris
is going to be deprecated and removed from rustup eventually. The fun never stops with target tuples!
system
closed
December 11, 2021, 8:01pm
#3
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.