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: