From 74f59e927520f50c4ebeeb2ccaa8e611b7d48dd1 Mon Sep 17 00:00:00 2001 From: Yunhua Feng Date: Thu, 10 May 2018 16:47:44 +0800 Subject: [PATCH] BaseTools: Fix bug PCD type in component is not same with Pcd section 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 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 Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/AutoGen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 1e6511cdb5..cfa69655a9 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -423,6 +423,7 @@ class WorkspaceAutoGen(AutoGen): PcdInPlatform = Platform.Pcds[key] if PcdInPlatform.Type: BuildData.Pcds[key].Type = PcdInPlatform.Type + BuildData.Pcds[key].Pending = False if BuildData.MetaFile in Platform.Modules: PlatformModule = Platform.Modules[str(BuildData.MetaFile)] @@ -430,6 +431,7 @@ class WorkspaceAutoGen(AutoGen): PcdInPlatform = PlatformModule.Pcds[key] if PcdInPlatform.Type: BuildData.Pcds[key].Type = PcdInPlatform.Type + BuildData.Pcds[key].Pending = False if TAB_PCDS_DYNAMIC_EX in BuildData.Pcds[key].Type: if BuildData.IsBinaryModule: -- 2.39.2