BaseTools: Fix Sku inherit issue.
The final Pcd value should only be override by its parents. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Feng Bob C <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
4cc824283c
commit
09c80b07b4
@ -2251,6 +2251,8 @@ class SkuClass():
|
||||
return self.__SkuInherit.get(skuname,"DEFAULT")
|
||||
|
||||
def GetSkuChain(self,sku):
|
||||
if sku == "DEFAULT":
|
||||
return ["DEFAULT"]
|
||||
skulist = [sku]
|
||||
nextsku = sku
|
||||
while 1:
|
||||
|
@ -1327,7 +1327,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
while '[' in FieldName:
|
||||
FieldName = FieldName.rsplit('[', 1)[0]
|
||||
CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d);\n' % (Pcd.DatumType, FieldName.strip("."), ArrayIndex + 1)
|
||||
for skuname in self.SkuIdMgr.SkuOverrideOrder():
|
||||
for skuname in self.SkuIdMgr.GetSkuChain(SkuName):
|
||||
inherit_OverrideValues = Pcd.SkuOverrideValues[skuname]
|
||||
for FieldList in [inherit_OverrideValues.get(DefaultStoreName)]:
|
||||
if not FieldList:
|
||||
@ -1391,7 +1391,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
CApp = CApp + ' Pcd->%s = %dULL; // From %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], FieldList[FieldName][2], FieldList[FieldName][0])
|
||||
else:
|
||||
CApp = CApp + ' Pcd->%s = %d; // From %s Line %d Value %s\n' % (FieldName, Value, FieldList[FieldName][1], FieldList[FieldName][2], FieldList[FieldName][0])
|
||||
for skuname in self.SkuIdMgr.SkuOverrideOrder():
|
||||
for skuname in self.SkuIdMgr.GetSkuChain(SkuName):
|
||||
inherit_OverrideValues = Pcd.SkuOverrideValues[skuname]
|
||||
for FieldList in [Pcd.DefaultFromDSC,inherit_OverrideValues.get(DefaultStoreName)]:
|
||||
if not FieldList:
|
||||
|
Loading…
x
Reference in New Issue
Block a user