Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions platformio/builder/tools/piolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,16 @@ class LibBuilderBase:

_INCLUDE_DIRS_CACHE = None

def get_conditional_scanner_cpppath(self):
cpppath = []
for item in self.envorigin.get("CPPPATH", []) + self.env.get("CPPPATH", []):
if item not in cpppath:
cpppath.append(item)
for item in self.get_include_dirs():
if item not in cpppath:
cpppath.append(item)
return cpppath
Comment on lines +123 to +131
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_conditional_scanner_cpppath() is never called, so the conditional scanner still uses only get_include_dirs() / _INCLUDE_DIRS_CACHE (see get_implicit_includes()), and the described LDF(+)-mode failure won’t be fixed. Either wire this method into the CCONDITIONAL_SCANNER (and likely CLASSIC_SCANNER) invocation by building include_dirs from the returned CPPPATH (ensuring entries are SCons Dir nodes / normalized paths), or remove the unused helper to avoid dead code.

Copilot uses AI. Check for mistakes.

def __init__(self, env, path, manifest=None, verbose=False):
self.env = env.Clone()
self.envorigin = env.Clone()
Expand Down
Loading