From 6d961e2cfa64b9551bf7898d0a25c3f3519d40b3 Mon Sep 17 00:00:00 2001 From: Joey Vagedes Date: Fri, 8 Sep 2023 15:50:22 -0700 Subject: [PATCH] update --- edk2toollib/uefi/edk2/parsers/dsc_parser.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/edk2toollib/uefi/edk2/parsers/dsc_parser.py b/edk2toollib/uefi/edk2/parsers/dsc_parser.py index 463bf888..4f994a2d 100644 --- a/edk2toollib/uefi/edk2/parsers/dsc_parser.py +++ b/edk2toollib/uefi/edk2/parsers/dsc_parser.py @@ -366,6 +366,8 @@ def _parse_libraries(self): for scope in current_scope: key = f"{scope.strip()}.{lib.strip()}".lower() value = instance.strip() + if os.path.isabs(value): + value = self._Edk2PathUtil.GetEdk2RelativePathFromAbsolutePath(value) if key in self.ScopedLibraryDict and value not in self.ScopedLibraryDict[key]: self.ScopedLibraryDict[key].insert(0, value) else: @@ -400,6 +402,8 @@ def _parse_components(self): for scope in current_scope: # Components without a specific scope (common or empty) are added to all current scopes + if os.path.isabs(line.strip(" {")): + line = self._Edk2PathUtil.GetEdk2RelativePathFromAbsolutePath(line.strip(" {")) if "common" in current_scope[0]: for arch in self.InputVars.get("TARGET_ARCH", "").split(" "): scope = current_scope[0].replace("common", arch).lower() @@ -459,8 +463,11 @@ def _build_library_override_dictionary(self, lines): if section == self.SECTION_LIBRARY: logging.debug(f" Library Section Override: {line}") lib, instance = map(str.strip, line.split("|")) - lib = lib.lower() + if os.path.isabs(instance): + instance = self._Edk2PathUtil.GetEdk2RelativePathFromAbsolutePath(instance) + + lib = lib.lower() if lib == "null": library_override_dictionary["NULL"].append(instance) else: