Skip to content

Commit

Permalink
Modifying how libraries are handled. When multiple NULL libraries exi…
Browse files Browse the repository at this point in the history
…st 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.
  • Loading branch information
apop5 committed Nov 22, 2024
1 parent 1d941cf commit 74cbaa5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions edk2toollib/uefi/edk2/parsers/buildreport_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 74cbaa5

Please sign in to comment.