Skip to content

Commit f172684

Browse files
authored
allow manual override of system type (platformio#4952)
* allow manual override of system type https://community.platformio.org/t/windows-on-arm64-problem-installing-xtensa-toolchain/25497 * fix lint
1 parent 44ef6e3 commit f172684

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

platformio/util.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import datetime
1616
import functools
1717
import math
18+
import os
1819
import platform
1920
import re
2021
import shutil
@@ -136,6 +137,11 @@ def get_instance(*args, **kwargs):
136137

137138

138139
def get_systype():
140+
# allow manual override, eg. for
141+
# windows on arm64 systems with emulated x86
142+
if "PLATFORMIO_SYSTEM_TYPE" in os.environ:
143+
return os.environ.get("PLATFORMIO_SYSTEM_TYPE")
144+
139145
system = platform.system().lower()
140146
arch = platform.machine().lower()
141147
if system == "windows":

0 commit comments

Comments
 (0)