mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Merge 916c27e5bd
into f609e1ddaf
This commit is contained in:
commit
4a9ef295c5
1 changed files with 24 additions and 8 deletions
|
@ -163,14 +163,30 @@ impl Arch {
|
|||
|
||||
// TODO: Implement `variant` support checks
|
||||
|
||||
// Windows ARM64 runs emulated x86_64 binaries transparently
|
||||
// Similarly, macOS aarch64 runs emulated x86_64 binaries transparently if you have Rosetta
|
||||
// installed. We don't try to be clever and check if that's the case here, we just assume
|
||||
// that if x86_64 distributions are available, they're usable.
|
||||
if (cfg!(windows) || cfg!(target_os = "macos"))
|
||||
&& matches!(self.family, target_lexicon::Architecture::Aarch64(_))
|
||||
{
|
||||
return other.family == target_lexicon::Architecture::X86_64;
|
||||
if cfg!(windows) {
|
||||
match (self.family, other.family) {
|
||||
// Windows aarch64 runs emulated x86_64 binaries transparently
|
||||
(
|
||||
target_lexicon::Architecture::Aarch64(_),
|
||||
target_lexicon::Architecture::X86_64,
|
||||
)
|
||||
// Windows x86_64 runs emulated x86_32 binaries transparently
|
||||
| (target_lexicon::Architecture::X86_64, target_lexicon::Architecture::X86_32(_)) => {
|
||||
return true
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
} else if cfg!(target_os = "macos") {
|
||||
match (self.family, other.family) {
|
||||
// macOS aarch64 runs emulated x86_64 binaries transparently if you have Rosetta
|
||||
// installed. We don't try to be clever and check if that's the case here, we just assume
|
||||
// that if x86_64 distributions are available, they're usable.
|
||||
(
|
||||
target_lexicon::Architecture::Aarch64(_),
|
||||
target_lexicon::Architecture::X86_64,
|
||||
) => return true,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue