forked from platformio/platformio-core
Improve removing of default build flags using build_unflags
option // Resolve #1712
This commit is contained in:
@ -7,6 +7,8 @@ PlatformIO 3.0
|
||||
3.5.4 (2018-??-??)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Improved removing of default build flags using `build_unflags <http://docs.platformio.org/page/projectconf/section_env_build.html#build-unflags>`__ option
|
||||
(`issue #1712 <https://github.com/platformio/platformio-core/issues/1712>`_)
|
||||
* Export ``LIBS``, ``LIBPATH``, and ``LINKFLAGS`` data from project dependent
|
||||
libraries to the global build environment
|
||||
* Don't export ``CPPPATH`` data of project dependent libraries to framework's
|
||||
|
@ -190,7 +190,18 @@ def ProcessFlags(env, flags): # pylint: disable=too-many-branches
|
||||
def ProcessUnFlags(env, flags):
|
||||
if not flags:
|
||||
return
|
||||
for key, unflags in env.ParseFlagsExtended(flags).items():
|
||||
parsed = env.ParseFlagsExtended(flags)
|
||||
|
||||
# get all flags and copy them to each "*FLAGS" variable
|
||||
all_flags = []
|
||||
for key, unflags in parsed.items():
|
||||
if key.endswith("FLAGS"):
|
||||
all_flags.extend(unflags)
|
||||
for key, unflags in parsed.items():
|
||||
if key.endswith("FLAGS"):
|
||||
parsed[key].extend(all_flags)
|
||||
|
||||
for key, unflags in parsed.items():
|
||||
for unflag in unflags:
|
||||
for current in env.get(key, []):
|
||||
conditions = [
|
||||
|
Reference in New Issue
Block a user