From 09af9bd9be2d3e31bba979f8cf6446017b0b863e Mon Sep 17 00:00:00 2001 From: Bob Feng Date: Wed, 4 Nov 2020 11:01:39 +0800 Subject: BaseTools: Enable Module Scope Structure Pcd REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2648 This patch is to enable the Module scoped Structure Pcd usage. User can set structure pcd field value in module scope. For example, under the [components] section of a dsc file, user can override some field value for a specific module. Package/Module.inf{ gUefiTokenSpaceGuid.StructurePcdModule.FieldName | 5 } Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Tested-by: Liming Gao Acked-by: Liming Gao --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/ModuleAutoGen.py') diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py index eebf6e87f5..d70b0d7ae8 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -1032,7 +1032,7 @@ class ModuleAutoGen(AutoGen): @cached_property def ModulePcdList(self): # apply PCD settings from platform - RetVal = self.PlatformInfo.ApplyPcdSetting(self.Module, self.Module.Pcds) + RetVal = self.PlatformInfo.ApplyPcdSetting(self, self.Module.Pcds) return RetVal @cached_property @@ -1063,7 +1063,7 @@ class ModuleAutoGen(AutoGen): continue Pcds.add(Key) PcdsInLibrary[Key] = copy.copy(Library.Pcds[Key]) - RetVal.extend(self.PlatformInfo.ApplyPcdSetting(self.Module, PcdsInLibrary, Library=Library)) + RetVal.extend(self.PlatformInfo.ApplyPcdSetting(self, PcdsInLibrary, Library=Library)) return RetVal ## Get the GUID value mapping -- cgit v1.2.3