Ensure real dev/platform name before build process // Resolve #1170

This commit is contained in:
Ivan Kravets
2017-11-08 00:38:19 +02:00
parent d1a2dba68c
commit 4c170b7934
2 changed files with 7 additions and 5 deletions

View File

@ -613,8 +613,8 @@ def GetLibBuilders(env): # pylint: disable=too-many-branches
items = []
compat_mode = int(env.get("LIB_COMPAT_MODE", 1))
verbose = (int(ARGUMENTS.get("PIOVERBOSE", 0))
and not env.GetOption('clean'))
verbose = int(ARGUMENTS.get("PIOVERBOSE",
0)) and not env.GetOption('clean')
def _check_lib_builder(lb):
if lb.name in env.get("LIB_IGNORE", []):

View File

@ -61,6 +61,9 @@ def LoadPioPlatform(env, variables):
p = env.PioPlatform()
installed_packages = p.get_installed_packages()
# Ensure real platform name
env['PIOPLATFORM'] = p.name
# Add toolchains and uploaders to $PATH
for name in installed_packages:
type_ = p.get_package_type(name)
@ -80,9 +83,8 @@ def LoadPioPlatform(env, variables):
board_config = env.BoardConfig()
for k in variables.keys():
if (k in env
or not any([k.startswith("BOARD_"),
k.startswith("UPLOAD_")])):
if k in env or \
not any([k.startswith("BOARD_"), k.startswith("UPLOAD_")]):
continue
_opt, _val = k.lower().split("_", 1)
if _opt == "board":