Resolved an issue with incorrect path resolution when linking static libraries via the build_flags // Resolve #5004

This commit is contained in:
Ivan Kravets
2024-12-12 19:46:11 +02:00
parent dd3fe909a1
commit 014ac79c87
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@ test-driven methodologies, and modern toolchains for unrivaled success.
~~~~~~~~~~~~~~~~~~~
* Resolved an issue where the ``compiledb`` target failed to properly escape compiler executable paths containing spaces (`issue #4998 <https://github.com/platformio/platformio-core/issues/4998>`_)
* Resolved an issue with incorrect path resolution when linking static libraries via the `build_flags <https://docs.platformio.org/en/latest/projectconf/sections/env/options/build/build_flags.html>`__ option (`issue #5004 <https://github.com/platformio/platformio-core/issues/5004>`_)
6.1.16 (2024-09-26)
~~~~~~~~~~~~~~~~~~~

View File

@ -219,6 +219,11 @@ def ParseFlagsExtended(env, flags): # pylint: disable=too-many-branches
if os.path.isdir(p):
result[k][i] = os.path.abspath(p)
# fix relative LIBs
for i, l in enumerate(result.get("LIBS", [])):
if isinstance(l, FS.File):
result["LIBS"][i] = os.path.abspath(l.get_path())
# fix relative path for "-include"
for i, f in enumerate(result.get("CCFLAGS", [])):
if isinstance(f, tuple) and f[0] == "-include":