From d900d7c9857a676d9271a0ab499c12b379dc3652 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 13 Jul 2018 16:07:06 +0800 Subject: [PATCH] BaseTools: Remove the duplicate Pcd items The case is the Pcd item both used in 1 module inf and 1 lib inf, and in the DSC component section, it override the Pcd value. In the module, the pcd value is the override value, but in the lib inf the pcd value is the value that in the DSC PCD section's value, then it cause the Pcd value is different in the module and lib. but actually we only need use the Pcd value in the module to decide whether it use the same value. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index c5ab334459..a7af33d520 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1292,7 +1292,7 @@ class PlatformAutoGen(AutoGen): FixedAtBuildPcds = {} ShareFixedAtBuildPcdsSameValue = {} for Module in LibAuto._ReferenceModules: - for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds: + for Pcd in set(Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds): DefaultValue = Pcd.DefaultValue # Cover the case: DSC component override the Pcd value and the Pcd only used in one Lib if Pcd in Module.LibraryPcdList: -- 2.39.2