mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Merge branch 'release/v6.1.9'
This commit is contained in:
@ -15,6 +15,12 @@ PlatformIO Core 6
|
|||||||
|
|
||||||
**A professional collaborative platform for declarative, safety-critical, and test-driven embedded development.**
|
**A professional collaborative platform for declarative, safety-critical, and test-driven embedded development.**
|
||||||
|
|
||||||
|
6.1.9 (2023-07-06)
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* Rectified a regression bug that occurred when the ``-include`` flag was passed via the `build_flags <https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html>`__ option as a relative path and subsequently expanded (`issue #4683 <https://github.com/platformio/platformio-core/issues/4683>`_)
|
||||||
|
* Resolved an issue that resulted in unresolved absolute toolchain paths when generating the `Compilation database "compile_commands.json" <https://docs.platformio.org/en/latest/integration/compile_commands.html>`__ (`issue #4684 <https://github.com/platformio/platformio-core/issues/4684>`_)
|
||||||
|
|
||||||
6.1.8 (2023-07-05)
|
6.1.8 (2023-07-05)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
2
docs
2
docs
Submodule docs updated: 3f462c9ae6...f8dbf012e4
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
VERSION = (6, 1, 8)
|
VERSION = (6, 1, 9)
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -30,7 +30,7 @@ from SCons.Script import Variables # pylint: disable=import-error
|
|||||||
|
|
||||||
from platformio import app, fs
|
from platformio import app, fs
|
||||||
from platformio.platform.base import PlatformBase
|
from platformio.platform.base import PlatformBase
|
||||||
from platformio.proc import get_pythonexe_path, where_is_program
|
from platformio.proc import get_pythonexe_path
|
||||||
from platformio.project.helpers import get_project_dir
|
from platformio.project.helpers import get_project_dir
|
||||||
|
|
||||||
AllowSubstExceptions(NameError)
|
AllowSubstExceptions(NameError)
|
||||||
@ -195,13 +195,6 @@ if env.get("SIZETOOL") and not (
|
|||||||
Default("checkprogsize")
|
Default("checkprogsize")
|
||||||
|
|
||||||
if "compiledb" in COMMAND_LINE_TARGETS:
|
if "compiledb" in COMMAND_LINE_TARGETS:
|
||||||
# Resolve absolute path of toolchain
|
|
||||||
for cmd in ("CC", "CXX", "AS"):
|
|
||||||
if cmd not in env:
|
|
||||||
continue
|
|
||||||
if os.path.isabs(env[cmd]):
|
|
||||||
continue
|
|
||||||
env[cmd] = where_is_program(env.subst("$%s" % cmd), env.subst("${ENV['PATH']}"))
|
|
||||||
env.Alias("compiledb", env.CompilationDatabase("$COMPILATIONDB_PATH"))
|
env.Alias("compiledb", env.CompilationDatabase("$COMPILATIONDB_PATH"))
|
||||||
|
|
||||||
# Print configured protocols
|
# Print configured protocols
|
||||||
|
@ -26,6 +26,7 @@ from SCons.Script import SConscript # pylint: disable=import-error
|
|||||||
from platformio import __version__, fs
|
from platformio import __version__, fs
|
||||||
from platformio.compat import IS_MACOS, string_types
|
from platformio.compat import IS_MACOS, string_types
|
||||||
from platformio.package.version import pepver_to_semver
|
from platformio.package.version import pepver_to_semver
|
||||||
|
from platformio.proc import where_is_program
|
||||||
|
|
||||||
SRC_HEADER_EXT = ["h", "hpp"]
|
SRC_HEADER_EXT = ["h", "hpp"]
|
||||||
SRC_ASM_EXT = ["S", "spp", "SPP", "sx", "s", "asm", "ASM"]
|
SRC_ASM_EXT = ["S", "spp", "SPP", "sx", "s", "asm", "ASM"]
|
||||||
@ -125,12 +126,21 @@ def ProcessProgramDeps(env):
|
|||||||
# remove specified flags
|
# remove specified flags
|
||||||
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
|
env.ProcessUnFlags(env.get("BUILD_UNFLAGS"))
|
||||||
|
|
||||||
if "compiledb" in COMMAND_LINE_TARGETS and env.get(
|
if "compiledb" in COMMAND_LINE_TARGETS:
|
||||||
"COMPILATIONDB_INCLUDE_TOOLCHAIN"
|
# Resolve absolute path of toolchain
|
||||||
):
|
for cmd in ("CC", "CXX", "AS"):
|
||||||
for scope, includes in env.DumpIntegrationIncludes().items():
|
if cmd not in env:
|
||||||
if scope in ("toolchain",):
|
continue
|
||||||
env.Append(CPPPATH=includes)
|
if os.path.isabs(env[cmd]):
|
||||||
|
continue
|
||||||
|
env[cmd] = where_is_program(
|
||||||
|
env.subst("$%s" % cmd), env.subst("${ENV['PATH']}")
|
||||||
|
)
|
||||||
|
|
||||||
|
if env.get("COMPILATIONDB_INCLUDE_TOOLCHAIN"):
|
||||||
|
for scope, includes in env.DumpIntegrationIncludes().items():
|
||||||
|
if scope in ("toolchain",):
|
||||||
|
env.Append(CPPPATH=includes)
|
||||||
|
|
||||||
|
|
||||||
def ProcessProjectDeps(env):
|
def ProcessProjectDeps(env):
|
||||||
@ -207,9 +217,7 @@ def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches
|
|||||||
# fix relative path for "-include"
|
# fix relative path for "-include"
|
||||||
for i, f in enumerate(result.get("CCFLAGS", [])):
|
for i, f in enumerate(result.get("CCFLAGS", [])):
|
||||||
if isinstance(f, tuple) and f[0] == "-include":
|
if isinstance(f, tuple) and f[0] == "-include":
|
||||||
p = env.subst(f[1].get_path())
|
result["CCFLAGS"][i] = (f[0], env.subst(f[1].get_path()))
|
||||||
if os.path.exists(p):
|
|
||||||
result["CCFLAGS"][i] = (f[0], os.path.abspath(p))
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
@ -22,7 +22,10 @@ def test_generic_build(clirunner, validate_cliresult, tmpdir):
|
|||||||
("-D TEST_INT=13", "-DTEST_INT=13"),
|
("-D TEST_INT=13", "-DTEST_INT=13"),
|
||||||
("-DTEST_SINGLE_MACRO", "-DTEST_SINGLE_MACRO"),
|
("-DTEST_SINGLE_MACRO", "-DTEST_SINGLE_MACRO"),
|
||||||
('-DTEST_STR_SPACE="Andrew Smith"', '"-DTEST_STR_SPACE=Andrew Smith"'),
|
('-DTEST_STR_SPACE="Andrew Smith"', '"-DTEST_STR_SPACE=Andrew Smith"'),
|
||||||
|
("-Iinclude", "-Iinclude"),
|
||||||
|
("-include cpppath-include.h", "cpppath-include.h"),
|
||||||
("-Iextra_inc", "-Iextra_inc"),
|
("-Iextra_inc", "-Iextra_inc"),
|
||||||
|
("-Inon-existing-dir", "non-existing-dir"),
|
||||||
(
|
(
|
||||||
"-include $PROJECT_DIR/lib/component/component-forced-include.h",
|
"-include $PROJECT_DIR/lib/component/component-forced-include.h",
|
||||||
"component-forced-include.h",
|
"component-forced-include.h",
|
||||||
@ -103,12 +106,22 @@ projenv.Append(CPPDEFINES="POST_SCRIPT_MACRO")
|
|||||||
#error "I_AM_FORCED_COMPONENT_INCLUDE"
|
#error "I_AM_FORCED_COMPONENT_INCLUDE"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef I_AM_FORCED_CPPPATH_INCLUDE
|
||||||
|
#error "I_AM_FORCED_CPPPATH_INCLUDE"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef COMMENTED_MACRO
|
#ifdef COMMENTED_MACRO
|
||||||
#error "COMMENTED_MACRO"
|
#error "COMMENTED_MACRO"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
}
|
}
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
tmpdir.mkdir("include").join("cpppath-include.h").write(
|
||||||
|
"""
|
||||||
|
#define I_AM_FORCED_CPPPATH_INCLUDE
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
component_dir = tmpdir.mkdir("lib").mkdir("component")
|
component_dir = tmpdir.mkdir("lib").mkdir("component")
|
||||||
|
Reference in New Issue
Block a user