]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/WorkspaceCommon.py
BaseTools: Decouple AutoGen Objects
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / WorkspaceCommon.py
index 41ae684d3ee916f9082c0052932baff360fec5f3..76583f46e500df49340219a79314f0684a062b32 100644 (file)
@@ -88,6 +88,8 @@ def GetLiabraryInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchai
     return GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain)\r
 \r
 def GetModuleLibInstances(Module, Platform, BuildDatabase, Arch, Target, Toolchain, FileName = '', EdkLogger = None):\r
+    if Module.LibInstances:\r
+        return Module.LibInstances\r
     ModuleType = Module.ModuleType\r
 \r
     # add forced library instances (specified under LibraryClasses sections)\r
@@ -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\r
     #\r
     SortedLibraryList.reverse()\r
+    Module.LibInstances = SortedLibraryList\r
+    SortedLibraryList = [lib.SetReferenceModule(Module) for lib in SortedLibraryList]\r
     return SortedLibraryList\r