mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 13:43:45 +00:00
Allow use of x86-64 Python on ARM Windows (#11625)
Closes https://github.com/astral-sh/uv/issues/11493
This commit is contained in:
parent
80b0d4c4e2
commit
fdebc0c7fd
3 changed files with 33 additions and 7 deletions
|
@ -103,6 +103,26 @@ impl Arch {
|
|||
}
|
||||
}
|
||||
|
||||
/// Does the current architecture support running the other?
|
||||
///
|
||||
/// When the architecture is equal, this is always true. Otherwise, this is true if the
|
||||
/// architecture is transparently emulated or is a microarchitecture with worse performance
|
||||
/// characteristics.
|
||||
pub(crate) fn supports(self, other: Self) -> bool {
|
||||
if self == other {
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: Implement `variant` support checks
|
||||
|
||||
// Windows ARM64 runs emulated x86_64 binaries transparently
|
||||
if cfg!(windows) && matches!(self.family, target_lexicon::Architecture::Aarch64(_)) {
|
||||
return other.family == target_lexicon::Architecture::X86_64;
|
||||
}
|
||||
|
||||
false
|
||||
}
|
||||
|
||||
pub fn family(&self) -> target_lexicon::Architecture {
|
||||
self.family
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue