X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FPython%2FWorkspace%2FWorkspaceCommon.py;h=76583f46e500df49340219a79314f0684a062b32;hp=41ae684d3ee916f9082c0052932baff360fec5f3;hb=e8449e1d8e3b40186eb16ff25242397cffb00a63;hpb=197ca7febf8668be505ff904f75b97f9e465df82 diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 41ae684d3e..76583f46e5 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -88,6 +88,8 @@ def GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchai return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain) def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain, FileName = '', EdkLogger = None): + if Module.LibInstances: + return Module.LibInstances ModuleType = Module.ModuleType # add forced library instances (specified under LibraryClasses sections) @@ -246,4 +248,6 @@ def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolcha # The DAG Topo sort produces the destructor order, so the list of constructors must generated in the reverse order # SortedLibraryList.reverse() + Module.LibInstances = SortedLibraryList + SortedLibraryList = [lib.SetReferenceModule(Module) for lib in SortedLibraryList] return SortedLibraryList