mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
feat(tools): Added cmake and ninja arm binaries
Closes https://github.com/espressif/esp-idf/issues/18272
This commit is contained in:
+7
-1
@@ -202,6 +202,7 @@ PYTHON_PLATFORM = f'{platform.system()}-{platform.machine()}'
|
||||
# Identifiers used in tools.json for different platforms.
|
||||
PLATFORM_WIN32 = 'win32'
|
||||
PLATFORM_WIN64 = 'win64'
|
||||
PLATFORM_WIN_ARM64 = 'win-arm64'
|
||||
PLATFORM_MACOS = 'macos'
|
||||
PLATFORM_MACOS_ARM64 = 'macos-arm64'
|
||||
PLATFORM_LINUX32 = 'linux-i686'
|
||||
@@ -232,7 +233,8 @@ class Platforms:
|
||||
'Windows-x86_64': PLATFORM_WIN64,
|
||||
'Windows-AMD64': PLATFORM_WIN64,
|
||||
'x86_64-w64-mingw32': PLATFORM_WIN64,
|
||||
'Windows-ARM64': PLATFORM_WIN64,
|
||||
PLATFORM_WIN_ARM64: PLATFORM_WIN_ARM64,
|
||||
'Windows-ARM64': PLATFORM_WIN_ARM64,
|
||||
# macOS
|
||||
PLATFORM_MACOS: PLATFORM_MACOS,
|
||||
'osx': PLATFORM_MACOS,
|
||||
@@ -773,11 +775,15 @@ class IDFToolVersion:
|
||||
def get_download_for_platform(self, platform_name: str | None) -> IDFToolDownload | None:
|
||||
"""
|
||||
Get download for given platform if usable download already exists.
|
||||
On win-arm64, falls back to win64 when no native build is available.
|
||||
"""
|
||||
try:
|
||||
platform_name = Platforms.get(platform_name)
|
||||
if platform_name in self.downloads.keys():
|
||||
return self.downloads[platform_name]
|
||||
# On Windows ARM64, use win64 (x86_64) build when no native win-arm64 exists
|
||||
if platform_name == PLATFORM_WIN_ARM64 and PLATFORM_WIN64 in self.downloads:
|
||||
return self.downloads[PLATFORM_WIN64]
|
||||
# exception can be omitted, as not detected platform is handled without err message
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user