mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Fix cancelling any previous definition of name, either built in or provided with a `-D
` option // Resolve #191
This commit is contained in:
@ -4,9 +4,6 @@ Release History
|
|||||||
1.5.0 (2015-05-??)
|
1.5.0 (2015-05-??)
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
* Created `PlatformIO gitter.im <https://gitter.im/platformio/platformio>`_
|
|
||||||
room
|
|
||||||
(`issue #174 <https://github.com/platformio/platformio/issues/174>`_)
|
|
||||||
* Added GDB as alternative uploader to `ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__ platform
|
* Added GDB as alternative uploader to `ststm32 <http://docs.platformio.org/en/latest/platforms/ststm32.html>`__ platform
|
||||||
(`issue #175 <https://github.com/platformio/platformio/issues/174>`_)
|
(`issue #175 <https://github.com/platformio/platformio/issues/174>`_)
|
||||||
* Added `examples <https://github.com/platformio/platformio/tree/develop/examples>`__
|
* Added `examples <https://github.com/platformio/platformio/tree/develop/examples>`__
|
||||||
@ -14,6 +11,9 @@ Release History
|
|||||||
(`issue #154 <https://github.com/platformio/platformio/issues/154>`_)
|
(`issue #154 <https://github.com/platformio/platformio/issues/154>`_)
|
||||||
* Fixed parsing of includes for PlatformIO Library Dependency Finder
|
* Fixed parsing of includes for PlatformIO Library Dependency Finder
|
||||||
(`issue #189 <https://github.com/platformio/platformio/issues/189>`_)
|
(`issue #189 <https://github.com/platformio/platformio/issues/189>`_)
|
||||||
|
* Fixed cancelling any previous definition of name, either built in or provided
|
||||||
|
with a ``-D`` option
|
||||||
|
(`issue #191 <https://github.com/platformio/platformio/issues/191>`_)
|
||||||
|
|
||||||
1.4.0 (2015-04-11)
|
1.4.0 (2015-04-11)
|
||||||
------------------
|
------------------
|
||||||
|
@ -15,18 +15,13 @@ from platformio.util import pioversion_to_intstr
|
|||||||
def BuildFirmware(env):
|
def BuildFirmware(env):
|
||||||
|
|
||||||
# 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"):
|
||||||
env.Replace(
|
env.Replace(
|
||||||
AS="$CC",
|
AS="$CC",
|
||||||
ASCOM="$ASPPCOM"
|
ASCOM="$ASPPCOM"
|
||||||
)
|
)
|
||||||
|
|
||||||
if "extra_flags" in env.get("BOARD_OPTIONS", {}).get("build", {}):
|
env.ProcessFlags()
|
||||||
env.MergeFlags(env.subst("${BOARD_OPTIONS['build']['extra_flags']}"))
|
|
||||||
|
|
||||||
if "BUILD_FLAGS" in env:
|
|
||||||
env.MergeFlags(env['BUILD_FLAGS'])
|
|
||||||
|
|
||||||
env.BuildFramework()
|
env.BuildFramework()
|
||||||
|
|
||||||
firmenv = env.Clone()
|
firmenv = env.Clone()
|
||||||
@ -69,6 +64,22 @@ def BuildFirmware(env):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def ProcessFlags(env):
|
||||||
|
if "extra_flags" in env.get("BOARD_OPTIONS", {}).get("build", {}):
|
||||||
|
env.MergeFlags(env.subst("${BOARD_OPTIONS['build']['extra_flags']}"))
|
||||||
|
|
||||||
|
if "BUILD_FLAGS" in env:
|
||||||
|
env.MergeFlags(env['BUILD_FLAGS'])
|
||||||
|
|
||||||
|
# Cancel any previous definition of name, either built in or
|
||||||
|
# provided with a -D option // Issue #191
|
||||||
|
undefines = [f for f in env.get("CCFLAGS", []) if f.startswith("-U")]
|
||||||
|
if undefines:
|
||||||
|
for undef in undefines:
|
||||||
|
env['CCFLAGS'].remove(undef)
|
||||||
|
env.Append(_CPPDEFFLAGS=" %s" % " ".join(undefines))
|
||||||
|
|
||||||
|
|
||||||
def GlobCXXFiles(env, path):
|
def GlobCXXFiles(env, path):
|
||||||
files = []
|
files = []
|
||||||
for suff in ["*.c", "*.cpp", "*.S"]:
|
for suff in ["*.c", "*.cpp", "*.S"]:
|
||||||
@ -373,6 +384,7 @@ def exists(_):
|
|||||||
|
|
||||||
def generate(env):
|
def generate(env):
|
||||||
env.AddMethod(BuildFirmware)
|
env.AddMethod(BuildFirmware)
|
||||||
|
env.AddMethod(ProcessFlags)
|
||||||
env.AddMethod(GlobCXXFiles)
|
env.AddMethod(GlobCXXFiles)
|
||||||
env.AddMethod(VariantDirRecursive)
|
env.AddMethod(VariantDirRecursive)
|
||||||
env.AddMethod(BuildFramework)
|
env.AddMethod(BuildFramework)
|
||||||
|
Reference in New Issue
Block a user