BaseTools: Fix the bug for Pcd used in command line's override
V2: remove the not used parameter i Fix the bug for Pcd used in command line not override the Pcd used in the [component] driver's sub-section. Case: DSC file: [PcdsFixedAtBuild] TokenSpaceGuid.PcdTest [Components] TestPkg/TestDriver.inf { <PcdsFixedAtBuild> TokenSpaceGuid.PcdTest|"b" } build command with --pcd TokenSpaceGuid.PcdTest="AAAABB" Then we found the Pcd value in the AutoGen.c file is incorrect, because of the incorrect logic that use the pcd in the [component] section to re-override it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -1067,7 +1067,12 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
EdkLogger.error("build", FORMAT_INVALID, Cause, ExtraData="%s.%s" % (TokenSpaceGuidCName, TokenCName))
|
||||
GlobalData.BuildOptionPcd[i] = (TokenSpaceGuidCName, TokenCName, FieldName, pcdvalue, ("build command options", 1))
|
||||
|
||||
if GlobalData.BuildOptionPcd:
|
||||
for pcd in GlobalData.BuildOptionPcd:
|
||||
(TokenSpaceGuidCName, TokenCName, FieldName, pcdvalue, _) = pcd
|
||||
for BuildData in self._Bdb._CACHE_.values():
|
||||
if BuildData.Arch != self.Arch:
|
||||
continue
|
||||
if BuildData.MetaFile.Ext == '.dec' or BuildData.MetaFile.Ext == '.dsc':
|
||||
continue
|
||||
for key in BuildData.Pcds:
|
||||
|
Reference in New Issue
Block a user