mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Fixed an issue with project generator when `src_build_flags
` were not respected // Resolve #3137
This commit is contained in:
@ -27,6 +27,7 @@ PlatformIO Core 4.0
|
||||
* Fixed an issue when installing a package using custom Git tag and submodules were not updated correctly (`issue #3060 <https://github.com/platformio/platformio-core/issues/3060>`_)
|
||||
* Fixed an issue with linking process when ``$LDSCRIPT`` contains a space in path
|
||||
* Fixed security issue when extracting items from TAR archive (`issue #2995 <https://github.com/platformio/platformio-core/issues/2995>`_)
|
||||
* Fixed an issue with project generator when ``src_build_flags`` were not respected (`issue #3137 <https://github.com/platformio/platformio-core/issues/3137>`_)
|
||||
|
||||
4.0.3 (2019-08-30)
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
@ -189,7 +189,7 @@ if "idedata" in COMMAND_LINE_TARGETS:
|
||||
print (
|
||||
"\n%s\n"
|
||||
% dump_json_to_unicode(
|
||||
env.DumpIDEData(projenv) # pylint: disable=undefined-variable
|
||||
projenv.DumpIDEData() # pylint: disable=undefined-variable
|
||||
)
|
||||
)
|
||||
env.Exit(0)
|
||||
|
@ -25,11 +25,11 @@ from platformio.managers.core import get_core_package_dir
|
||||
from platformio.proc import exec_command, where_is_program
|
||||
|
||||
|
||||
def _dump_includes(env, projenv):
|
||||
def _dump_includes(env):
|
||||
includes = []
|
||||
|
||||
for item in projenv.get("CPPPATH", []):
|
||||
includes.append(projenv.subst(item))
|
||||
for item in env.get("CPPPATH", []):
|
||||
includes.append(env.subst(item))
|
||||
|
||||
# installed libs
|
||||
for lb in env.GetLibBuilders():
|
||||
@ -138,7 +138,7 @@ def _get_svd_path(env):
|
||||
return None
|
||||
|
||||
|
||||
def DumpIDEData(env, projenv):
|
||||
def DumpIDEData(env):
|
||||
LINTCCOM = "$CFLAGS $CCFLAGS $CPPFLAGS"
|
||||
LINTCXXCOM = "$CXXFLAGS $CCFLAGS $CPPFLAGS"
|
||||
|
||||
@ -146,7 +146,7 @@ def DumpIDEData(env, projenv):
|
||||
"env_name": env["PIOENV"],
|
||||
"libsource_dirs": [env.subst(l) for l in env.GetLibSourceDirs()],
|
||||
"defines": _dump_defines(env),
|
||||
"includes": _dump_includes(env, projenv),
|
||||
"includes": _dump_includes(env),
|
||||
"cc_flags": env.subst(LINTCCOM),
|
||||
"cxx_flags": env.subst(LINTCXXCOM),
|
||||
"cc_path": where_is_program(env.subst("$CC"), env.subst("${ENV['PATH']}")),
|
||||
|
@ -124,9 +124,6 @@ def BuildProgram(env):
|
||||
if "__test" in COMMAND_LINE_TARGETS:
|
||||
env.ConfigureTestTarget()
|
||||
|
||||
# build project with dependencies
|
||||
_build_project_deps(env)
|
||||
|
||||
# append into the beginning a main LD script
|
||||
if env.get("LDSCRIPT_PATH") and not any("-Wl,-T" in f for f in env["LINKFLAGS"]):
|
||||
env.Prepend(LINKFLAGS=["-T", env.subst("$LDSCRIPT_PATH")])
|
||||
@ -136,6 +133,9 @@ def BuildProgram(env):
|
||||
env.Prepend(_LIBFLAGS="-Wl,--start-group ")
|
||||
env.Append(_LIBFLAGS=" -Wl,--end-group")
|
||||
|
||||
# build project with dependencies
|
||||
_build_project_deps(env)
|
||||
|
||||
program = env.Program(
|
||||
os.path.join("$BUILD_DIR", env.subst("$PROGNAME")), env["PIOBUILDFILES"]
|
||||
)
|
||||
|
Reference in New Issue
Block a user