mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix an issue when `-U
in
build_flags
does not remove macro previously defined via
-D
` flag // Resolve #2508
This commit is contained in:
@ -33,6 +33,7 @@ PlatformIO 4.0
|
||||
* **Miscellaneous**
|
||||
|
||||
- Deprecated ``--only-check`` PlatformIO Core CLI option for "update" sub-commands, please use ``--dry-run`` instead
|
||||
- Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 <https://github.com/platformio/platformio-core/issues/2508>`_)
|
||||
|
||||
PlatformIO 3.0
|
||||
--------------
|
||||
|
@ -198,6 +198,8 @@ def ProcessFlags(env, flags): # pylint: disable=too-many-branches
|
||||
if undefines:
|
||||
for undef in undefines:
|
||||
env['CCFLAGS'].remove(undef)
|
||||
if undef[2:] in env['CPPDEFINES']:
|
||||
env['CPPDEFINES'].remove(undef[2:])
|
||||
env.Append(_CPPDEFFLAGS=" %s" % " ".join(undefines))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user