Skip to content

Commit

Permalink
Add win-arm64 support (#2745)
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf authored Aug 11, 2023
1 parent 1179823 commit 3e4b1da
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions libmamba/include/mamba/specs/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace mamba::specs
osx_arm64,
win_32,
win_64,
win_arm64,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion libmamba/src/core/channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ namespace mamba
const std::vector<std::string> KNOWN_PLATFORMS = {
"noarch", "linux-32", "linux-64", "linux-aarch64", "linux-armv6l",
"linux-armv7l", "linux-ppc64le", "linux-ppc64", "osx-64", "osx-arm64",
"win-32", "win-64", "zos-z"
"win-32", "win-64", "win-arm64", "zos-z"
};
} // namespace

Expand Down
9 changes: 9 additions & 0 deletions libmamba/src/specs/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ namespace mamba::specs
return "win-32";
case Platform::win_64:
return "win-64";
case Platform::win_arm64:
return "win-arm64";
default:
// All enum cases must be handled
assert(false);
Expand All @@ -76,6 +78,7 @@ namespace mamba::specs
Platform::osx_arm64,
Platform::win_32,
Platform::win_64,
Platform::win_arm64,
})
{
if (str_clean == platform_name(p))
Expand Down Expand Up @@ -136,7 +139,13 @@ namespace mamba::specs
#endif

#elif defined(_WIN64)
#if defined(_M_AMD64)
return Platform::win_64;
#elif defined(_M_ARM64)
return Platform::win_arm64;
#else
#error "Unknown Windows platform"
#endif
#elif defined(_WIN32)
return Platform::win_32;

Expand Down

0 comments on commit 3e4b1da

Please sign in to comment.