]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove the duplicate Pcd items
authorYonghong Zhu <yonghong.zhu@intel.com>
Fri, 13 Jul 2018 08:07:06 +0000 (16:07 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 18 Jul 2018 03:28:23 +0000 (11:28 +0800)
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 <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index c5ab334459dc668ecaa5cea521f0dbd7aceb08d9..a7af33d520367110db63f82d73c7356fd221c3b7 100644 (file)
@@ -1292,7 +1292,7 @@ class PlatformAutoGen(AutoGen):
             FixedAtBuildPcds = {}\r
             ShareFixedAtBuildPcdsSameValue = {}\r
             for Module in LibAuto._ReferenceModules:\r
             FixedAtBuildPcds = {}\r
             ShareFixedAtBuildPcdsSameValue = {}\r
             for Module in LibAuto._ReferenceModules:\r
-                for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds:\r
+                for Pcd in set(Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds):\r
                     DefaultValue = Pcd.DefaultValue\r
                     # Cover the case: DSC component override the Pcd value and the Pcd only used in one Lib\r
                     if Pcd in Module.LibraryPcdList:\r
                     DefaultValue = Pcd.DefaultValue\r
                     # Cover the case: DSC component override the Pcd value and the Pcd only used in one Lib\r
                     if Pcd in Module.LibraryPcdList:\r