load_usermods: Don't cross usermod includes

Only include paths for the base system deps, not those of other
usermods.
This commit is contained in:
Will Miles 2025-01-31 01:35:58 +00:00
parent 5d392d89ce
commit 4bc3408410

View File

@ -68,8 +68,10 @@ def cached_add_includes(dep, dep_cache: set, includes: deque):
for include in dep.get_include_dirs(): for include in dep.get_include_dirs():
if include not in includes: if include not in includes:
includes.appendleft(include) includes.appendleft(include)
for subdep in dep.depbuilders: if usermod_dir not in Path(dep.src_dir).parents:
cached_add_includes(subdep, dep_cache, includes) # Recurse, but only for NON-usermods
for subdep in dep.depbuilders:
cached_add_includes(subdep, dep_cache, includes)
# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies # Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies
# Save the old value # Save the old value