]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix bug PCD type in component is not same with Pcd section
authorYunhua Feng <yunhuax.feng@intel.com>
Thu, 10 May 2018 08:47:44 +0000 (16:47 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 22 May 2018 11:33:35 +0000 (19:33 +0800)
Per DSC spec 3.11 [Components] Sections:
The PCD access methods (and storage methods) are selected on a platform
basis - it is not permitted to have a PCD listed in one of the Pcd
sections and use it differently in an individual module. For example,
if a PCD is listed in a [PcdsFixedAtBuild] section, it is not permitted
to list it in a <PcdsPatchableInModule> sub-section of an INF file.
but current code doesn't report error for this case.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=951
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/AutoGen/AutoGen.py

index 1e6511cdb5d2eeaddabd862c99c09bf09f2b6a72..cfa69655a9c5ec21a6700e4fc9b6e157226d8957 100644 (file)
@@ -423,6 +423,7 @@ class WorkspaceAutoGen(AutoGen):
                                 PcdInPlatform = Platform.Pcds[key]\r
                                 if PcdInPlatform.Type:\r
                                     BuildData.Pcds[key].Type = PcdInPlatform.Type\r
+                                    BuildData.Pcds[key].Pending = False\r
 \r
                             if BuildData.MetaFile in Platform.Modules:\r
                                 PlatformModule = Platform.Modules[str(BuildData.MetaFile)]\r
@@ -430,6 +431,7 @@ class WorkspaceAutoGen(AutoGen):
                                     PcdInPlatform = PlatformModule.Pcds[key]\r
                                     if PcdInPlatform.Type:\r
                                         BuildData.Pcds[key].Type = PcdInPlatform.Type\r
+                                        BuildData.Pcds[key].Pending = False\r
 \r
                         if TAB_PCDS_DYNAMIC_EX in BuildData.Pcds[key].Type:\r
                             if BuildData.IsBinaryModule:\r