mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Restore PIO macros if it was deleted by framework
This commit is contained in:
@ -35,10 +35,13 @@ SRC_DEFAULT_FILTER = " ".join([
|
|||||||
|
|
||||||
def BuildProgram(env):
|
def BuildProgram(env):
|
||||||
|
|
||||||
env.Append(
|
def _append_pio_macros():
|
||||||
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
env.AppendUnique(
|
||||||
*pioversion_to_intstr())],
|
CPPDEFINES=["PLATFORMIO={0:02d}{1:02d}{2:02d}".format(
|
||||||
)
|
*pioversion_to_intstr())],
|
||||||
|
)
|
||||||
|
|
||||||
|
_append_pio_macros()
|
||||||
|
|
||||||
# fix ASM handling under non-casitive OS
|
# fix ASM handling under non-casitive OS
|
||||||
if not case_sensitive_suffixes(".s", ".S"):
|
if not case_sensitive_suffixes(".s", ".S"):
|
||||||
@ -60,6 +63,9 @@ def BuildProgram(env):
|
|||||||
env.BuildFrameworks([
|
env.BuildFrameworks([
|
||||||
f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")])
|
f.lower().strip() for f in env.get("FRAMEWORK", "").split(",")])
|
||||||
|
|
||||||
|
# restore PIO macros if it was deleted by framework
|
||||||
|
_append_pio_macros()
|
||||||
|
|
||||||
# build dependent libs
|
# build dependent libs
|
||||||
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
|
deplibs = env.BuildDependentLibraries("$PROJECTSRC_DIR")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user