Skip to content

Commit

Permalink
Fix issue with "-L relative/path" when parsing "build_flags" // Resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
ivankravets committed Jun 10, 2016
1 parent 4b093dc commit f6088cb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ PlatformIO 2.0
(`issue #683 <https://github.com/platformio/platformio/issues/683>`_)
* Added support for `Arduboy DevKit <https://www.arduboy.com>`__, the game system
the size of a credit card
* Fixed issue with ``-L relative/path`` when parsing ``build_flags``
(`issue #688 <https://github.com/platformio/platformio/issues/688>`_)

2.9.4 (2016-06-04)
~~~~~~~~~~~~~~~~~~
Expand Down
9 changes: 5 additions & 4 deletions platformio/builder/tools/platformio.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,11 @@ def ProcessFlags(env, flags):
env.Append(CPPDEFINES=[flag])
env.Append(**parsed_flags)

# fix relative CPPPATH
for i, p in enumerate(env.get("CPPPATH", [])):
if isdir(p):
env['CPPPATH'][i] = realpath(p)
# fix relative CPPPATH & LIBPATH
for k in ("CPPPATH", "LIBPATH"):
for i, p in enumerate(env.get(k, [])):
if isdir(p):
env[k][i] = realpath(p)
# fix relative path for "-include"
for i, f in enumerate(env.get("CCFLAGS", [])):
if isinstance(f, tuple) and f[0] == "-include":
Expand Down

0 comments on commit f6088cb

Please sign in to comment.