mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 19:04:29 +02:00
Ensure real dev/platform name before build process // Resolve #1170
This commit is contained in:
@@ -613,8 +613,8 @@ def GetLibBuilders(env): # pylint: disable=too-many-branches
|
|||||||
|
|
||||||
items = []
|
items = []
|
||||||
compat_mode = int(env.get("LIB_COMPAT_MODE", 1))
|
compat_mode = int(env.get("LIB_COMPAT_MODE", 1))
|
||||||
verbose = (int(ARGUMENTS.get("PIOVERBOSE", 0))
|
verbose = int(ARGUMENTS.get("PIOVERBOSE",
|
||||||
and not env.GetOption('clean'))
|
0)) and not env.GetOption('clean')
|
||||||
|
|
||||||
def _check_lib_builder(lb):
|
def _check_lib_builder(lb):
|
||||||
if lb.name in env.get("LIB_IGNORE", []):
|
if lb.name in env.get("LIB_IGNORE", []):
|
||||||
|
@@ -61,6 +61,9 @@ def LoadPioPlatform(env, variables):
|
|||||||
p = env.PioPlatform()
|
p = env.PioPlatform()
|
||||||
installed_packages = p.get_installed_packages()
|
installed_packages = p.get_installed_packages()
|
||||||
|
|
||||||
|
# Ensure real platform name
|
||||||
|
env['PIOPLATFORM'] = p.name
|
||||||
|
|
||||||
# Add toolchains and uploaders to $PATH
|
# Add toolchains and uploaders to $PATH
|
||||||
for name in installed_packages:
|
for name in installed_packages:
|
||||||
type_ = p.get_package_type(name)
|
type_ = p.get_package_type(name)
|
||||||
@@ -80,9 +83,8 @@ def LoadPioPlatform(env, variables):
|
|||||||
|
|
||||||
board_config = env.BoardConfig()
|
board_config = env.BoardConfig()
|
||||||
for k in variables.keys():
|
for k in variables.keys():
|
||||||
if (k in env
|
if k in env or \
|
||||||
or not any([k.startswith("BOARD_"),
|
not any([k.startswith("BOARD_"), k.startswith("UPLOAD_")]):
|
||||||
k.startswith("UPLOAD_")])):
|
|
||||||
continue
|
continue
|
||||||
_opt, _val = k.lower().split("_", 1)
|
_opt, _val = k.lower().split("_", 1)
|
||||||
if _opt == "board":
|
if _opt == "board":
|
||||||
|
Reference in New Issue
Block a user