-
Notifications
You must be signed in to change notification settings - Fork 1k
use 'tuple' instead of 'triple' for env overrides #4743
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -377,8 +377,10 @@ impl TargetTriple { | |
| } | ||
|
|
||
| pub(crate) fn from_build() -> Self { | ||
| if let Some(triple) = option_env!("RUSTUP_OVERRIDE_BUILD_TRIPLE") { | ||
| Self::new(triple) | ||
| if let Some(tuple) = option_env!("RUSTUP_OVERRIDE_BUILD_TUPLE") { | ||
| Self::new(tuple) | ||
| } else if let Some(tuple) = option_env!("RUSTUP_OVERRIDE_BUILD_TRIPLE") { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to add a warning here to deprecate and eventually remove this environment variable? IIRC we don't document it and it should only be used by rustup itself but I wouldn't be surprise if it's used by someone else who read the code. A warning for a version or two should hopefully help them. |
||
| Self::new(tuple) | ||
| } else { | ||
| Self::new(env!("TARGET")) | ||
| } | ||
|
|
@@ -549,8 +551,10 @@ impl TargetTriple { | |
| host_triple.map(TargetTriple::new) | ||
| } | ||
|
|
||
| if let Ok(triple) = process.var("RUSTUP_OVERRIDE_HOST_TRIPLE") { | ||
| Some(Self(triple)) | ||
| if let Ok(tuple) = process.var("RUSTUP_OVERRIDE_HOST_TUPLE") { | ||
| Some(Self(tuple)) | ||
| } else if let Ok(tuple) = process.var("RUSTUP_OVERRIDE_HOST_TRIPLE") { | ||
| Some(Self(tuple)) | ||
| } else { | ||
| inner() | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd prefer to avoid the outer scope here, it doesn't seem all that useful?