diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-28 17:15:00 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-29 11:10:29 +0800 |
commit | 37eef91017ad042035090cae46557f9d6e2d5917 (patch) | |
tree | 2180b6457353b0446c46f7ef5a9acbb8aa314a75 /BaseTools | |
parent | df43ea6c08100487776bb0962c657d214e345ae7 (diff) | |
download | edk2-37eef91017ad042035090cae46557f9d6e2d5917.zip edk2-37eef91017ad042035090cae46557f9d6e2d5917.tar.gz edk2-37eef91017ad042035090cae46557f9d6e2d5917.tar.bz2 |
BaseTools: Fixed regression issue for building !x86 buildsedk2-stable201908
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>
Diffstat (limited to 'BaseTools')
-rw-r--r-- | BaseTools/Source/Python/Workspace/InfBuildData.py | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index e63246b..7675b0e 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -156,8 +156,7 @@ class InfBuildData(ModuleBuildClassObject): self._DependencyFileList = None
self.LibInstances = []
self.ReferenceModules = set()
- self.Guids
- self.Pcds
+
def SetReferenceModule(self,Module):
self.ReferenceModules.add(Module)
return self
@@ -656,6 +655,20 @@ class InfBuildData(ModuleBuildClassObject): RetVal[CName] = Value
CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Record[5]]
self._GuidComments[CName] = [a[0] for a in CommentRecords]
+
+ for Type in [MODEL_PCD_FIXED_AT_BUILD,MODEL_PCD_PATCHABLE_IN_MODULE,MODEL_PCD_FEATURE_FLAG,MODEL_PCD_DYNAMIC,MODEL_PCD_DYNAMIC_EX]:
+ RecordList = self._RawData[Type, self._Arch, self._Platform]
+ for TokenSpaceGuid, _, _, _, _, _, LineNo in RecordList:
+ # get the guid value
+ if TokenSpaceGuid not in RetVal:
+ Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path)
+ if Value is None:
+ PackageList = "\n\t".join(str(P) for P in self.Packages)
+ EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
+ "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,
+ ExtraData=PackageList, File=self.MetaFile, Line=LineNo)
+ RetVal[TokenSpaceGuid] = Value
+ self._GuidsUsedByPcd[TokenSpaceGuid] = Value
return RetVal
## Retrieve include paths necessary for this module (for Edk.x style of modules)
@@ -858,7 +871,7 @@ class InfBuildData(ModuleBuildClassObject): return pkg
@cached_class_function
def GetGuidsUsedByPcd(self):
- self.Pcds
+ self.Guid
return self._GuidsUsedByPcd
## Retrieve PCD for given type
@@ -870,16 +883,6 @@ class InfBuildData(ModuleBuildClassObject): for TokenSpaceGuid, PcdCName, Setting, Arch, Platform, Id, LineNo in RecordList:
PcdDict[Arch, Platform, PcdCName, TokenSpaceGuid] = (Setting, LineNo)
PcdList.append((PcdCName, TokenSpaceGuid))
- # get the guid value
- if TokenSpaceGuid not in self.Guids:
- Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path)
- if Value is None:
- PackageList = "\n\t".join(str(P) for P in self.Packages)
- EdkLogger.error('build', RESOURCE_NOT_AVAILABLE,
- "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid,
- ExtraData=PackageList, File=self.MetaFile, Line=LineNo)
- self.Guids[TokenSpaceGuid] = Value
- self._GuidsUsedByPcd[TokenSpaceGuid] = Value
CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Id]
Comments = []
for CmtRec in CommentRecords:
|