From 0b64c9cbbf2b21e7786bf33d5c9fd793f132eaa9 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 16 Jan 2019 11:15:13 -0600 Subject: [PATCH] Filter resources by included libraries --- tools/config/__init__.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/config/__init__.py b/tools/config/__init__.py index c8d103e106..92b450cab6 100644 --- a/tools/config/__init__.py +++ b/tools/config/__init__.py @@ -1311,8 +1311,17 @@ class Config(object): for name, missing in missing_requirements.items() ) raise ConfigException(message) - - + all_json_paths = [ + cfg["__config_path"] for cfg in self.lib_config_data.values() + ] + included_json_files = [ + ref for ref in resources.get_file_refs(FileType.JSON) + if ( + not ref.name.endswith(self.__mbed_lib_config_name) + or ref.path in all_json_paths + ) + ] + resources.filter_by_libraries(included_json_files) if (hasattr(self.target, "release_versions") and "5" not in self.target.release_versions and "rtos" in self.lib_config_data):