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

Fix fallback to cargo-install: Use the default target unless user override #1430

Merged
merged 3 commits into from
Sep 30, 2023

Conversation

NobodyXu
Copy link
Member

which is guaranteed to work, instead of providing a custom --target from detect-targets.

The one from detect-targets might report musl even if the rustc reports gnu, since OSes like NixOS could use a custom glibc location that prevent glibc binaries built for other OSes be run for them.

However, if we are compiling the crate and rustc defaults to glibc, then it should be guaranteed to work.

which is guaranteed to work, instead of providing a custom `--target`
from `detect-targets`.

The one from `detect-targets` might report musl even if the `rustc`
reports gnu, since OSes like NixOS could use a custom glibc location
that prevent glibc binaries built for other OSes be run for them.

However, if we are compiling the crate and `rustc` defaults to glibc,
then it should be guaranteed to work.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu
Copy link
Member Author

Once this PR is merged, we can re-land the support for custom linux distro, e.g. x86_64-nixos-linux-gnu and x86_64-alpine-linux-musl to support installing binaries on more distros.

@NobodyXu NobodyXu added this pull request to the merge queue Sep 29, 2023
@passcod passcod removed this pull request from the merge queue due to a manual request Sep 29, 2023
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
@NobodyXu NobodyXu changed the title Fix fallback to cargo-install: Use the default target Fix fallback to cargo-install: Use the default target unless user override Sep 29, 2023
@NobodyXu NobodyXu added this pull request to the merge queue Sep 30, 2023
Merged via the queue into main with commit 8e08c65 Sep 30, 2023
32 checks passed
@NobodyXu NobodyXu deleted the fix/fallback-to-source branch September 30, 2023 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants