From 74cbaa507d0a1fb8246ec706de7c0605c317db09 Mon Sep 17 00:00:00 2001 From: Aaron Pop Date: Thu, 21 Nov 2024 15:04:33 -0800 Subject: [PATCH] Modifying how libraries are handled. When multiple NULL libraries exist for a module, the library class name will be appended with an integer. For modules with 2 null libraries, they will be named NULL0 and NULL1. --- edk2toollib/uefi/edk2/parsers/buildreport_parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/edk2toollib/uefi/edk2/parsers/buildreport_parser.py b/edk2toollib/uefi/edk2/parsers/buildreport_parser.py index b70abf8f..f138bd33 100644 --- a/edk2toollib/uefi/edk2/parsers/buildreport_parser.py +++ b/edk2toollib/uefi/edk2/parsers/buildreport_parser.py @@ -40,6 +40,7 @@ def __init__(self, content: str, ws: str, packagepatahlist: list, pathconverter: self.Type = "" self.PCDs = {} self.Libraries = {} + self.NullLibraryCount = 0 self.Depex = "" self.WorkspacePath = ws self.PackagePathList = packagepatahlist @@ -118,6 +119,10 @@ def Parse(self) -> None: lib_class = templine.partition("{")[2].partition("}")[0].partition(":")[0].strip() lib_instance = templine.partition("{")[0].strip() + if lib_class.strip().lower() == "null": + lib_class += str(self.NullLibraryCount) + self.NullLibraryCount += 1 + # Take absolute path and convert to EDK build path RelativePath = self.pathConverter.GetEdk2RelativePathFromAbsolutePath(lib_instance) if RelativePath is not None: