]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools:Build fail if define [DEPEX] in library inf
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index f71e08d7154dbff37595a63b4b3dd8d8732ca1f3..e7dbf66e2f2582154cff312d3775eda9e898267e 100644 (file)
@@ -2892,10 +2892,16 @@ class ModuleAutoGen(AutoGen):
                     if '.' not in item:\r
                         NewList.append(item)\r
                     else:\r
-                        if item not in self.FixedVoidTypePcds:\r
+                        FixedVoidTypePcds = {}\r
+                        if item in self.FixedVoidTypePcds:\r
+                            FixedVoidTypePcds = self.FixedVoidTypePcds\r
+                        elif M in self.PlatformInfo.LibraryAutoGenList:\r
+                            Index = self.PlatformInfo.LibraryAutoGenList.index(M)\r
+                            FixedVoidTypePcds = self.PlatformInfo.LibraryAutoGenList[Index].FixedVoidTypePcds\r
+                        if item not in FixedVoidTypePcds:\r
                             EdkLogger.error("build", FORMAT_INVALID, "{} used in [Depex] section should be used as FixedAtBuild type and VOID* datum type in the module.".format(item))\r
                         else:\r
-                            Value = self.FixedVoidTypePcds[item]\r
+                            Value = FixedVoidTypePcds[item]\r
                             if len(Value.split(',')) != 16:\r
                                 EdkLogger.error("build", FORMAT_INVALID,\r
                                                 "{} used in [Depex] section should be used as FixedAtBuild type and VOID* datum type and 16 bytes in the module.".format(item))\r