Skip to content

Commit d8ddfdc

Browse files
committed
Populate lib_dirs
1 parent 001c2d3 commit d8ddfdc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/resources/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@ def add_directory(
431431
".bld": FileType.BLD_REF,
432432
}
433433

434+
_DIR_EXT = {
435+
".a": FileType.LIB_DIR,
436+
".ar": FileType.LIB_DIR,
437+
}
438+
434439
def _add_file(self, file_path, base_path, into_path):
435440
""" Add a single file into the resources object that was found by
436441
scanning starting as base_path
@@ -448,6 +453,11 @@ def _add_file(self, file_path, base_path, into_path):
448453
self.add_file_ref(file_type, fake_path, file_path)
449454
except KeyError:
450455
pass
456+
try:
457+
dir_type = self._DIR_EXT[ext.lower()]
458+
self.add_file_ref(dir_type, dirname(fake_path), dirname(file_path))
459+
except KeyError:
460+
pass
451461

452462

453463
def scan_with_toolchain(self, src_paths, toolchain, dependencies_paths=None,

0 commit comments

Comments
 (0)