]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fixed regression issue for building !x86 builds edk2-stable201908
authorFeng, Bob C <bob.c.feng@intel.com>
Wed, 28 Aug 2019 09:15:00 +0000 (17:15 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Thu, 29 Aug 2019 03:10:29 +0000 (11:10 +0800)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2134

This patch is to fix a build tool regression issue which
was introduced by commit e8449e1d8e.

In commit e8449e1d8e, build tool check the pcd before
filter out the irrelevant library instance.

The logic of evaluating the priority of the library class
resolutions was not changed.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
BaseTools/Source/Python/Workspace/InfBuildData.py

index e63246b03b6e78739296f26bf2522c6214da9155..7675b0ea00ebd6a5fc3e823c965e32066f66f650 100644 (file)
@@ -156,8 +156,7 @@ class InfBuildData(ModuleBuildClassObject):
         self._DependencyFileList = None\r
         self.LibInstances = []\r
         self.ReferenceModules = set()\r
-        self.Guids\r
-        self.Pcds\r
+\r
     def SetReferenceModule(self,Module):\r
         self.ReferenceModules.add(Module)\r
         return self\r
@@ -656,6 +655,20 @@ class InfBuildData(ModuleBuildClassObject):
             RetVal[CName] = Value\r
             CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Record[5]]\r
             self._GuidComments[CName] = [a[0] for a in CommentRecords]\r
+\r
+        for Type in [MODEL_PCD_FIXED_AT_BUILD,MODEL_PCD_PATCHABLE_IN_MODULE,MODEL_PCD_FEATURE_FLAG,MODEL_PCD_DYNAMIC,MODEL_PCD_DYNAMIC_EX]:\r
+            RecordList = self._RawData[Type, self._Arch, self._Platform]\r
+            for TokenSpaceGuid, _, _, _, _, _, LineNo in RecordList:\r
+                # get the guid value\r
+                if TokenSpaceGuid not in RetVal:\r
+                    Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path)\r
+                    if Value is None:\r
+                        PackageList = "\n\t".join(str(P) for P in self.Packages)\r
+                        EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,\r
+                                        "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,\r
+                                        ExtraData=PackageList, File=self.MetaFile, Line=LineNo)\r
+                    RetVal[TokenSpaceGuid] = Value\r
+                    self._GuidsUsedByPcd[TokenSpaceGuid] = Value\r
         return RetVal\r
 \r
     ## Retrieve include paths necessary for this module (for Edk.x style of modules)\r
@@ -858,7 +871,7 @@ class InfBuildData(ModuleBuildClassObject):
         return pkg\r
     @cached_class_function\r
     def GetGuidsUsedByPcd(self):\r
-        self.Pcds\r
+        self.Guid\r
         return self._GuidsUsedByPcd\r
 \r
     ## Retrieve PCD for given type\r
@@ -870,16 +883,6 @@ class InfBuildData(ModuleBuildClassObject):
         for TokenSpaceGuid, PcdCName, Setting, Arch, Platform, Id, LineNo in RecordList:\r
             PcdDict[Arch, Platform, PcdCName, TokenSpaceGuid] = (Setting, LineNo)\r
             PcdList.append((PcdCName, TokenSpaceGuid))\r
-            # get the guid value\r
-            if TokenSpaceGuid not in self.Guids:\r
-                Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path)\r
-                if Value is None:\r
-                    PackageList = "\n\t".join(str(P) for P in self.Packages)\r
-                    EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,\r
-                                    "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,\r
-                                    ExtraData=PackageList, File=self.MetaFile, Line=LineNo)\r
-                self.Guids[TokenSpaceGuid] = Value\r
-                self._GuidsUsedByPcd[TokenSpaceGuid] = Value\r
             CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Id]\r
             Comments = []\r
             for CmtRec in CommentRecords:\r