From: Yunhua Feng Date: Fri, 20 Jul 2018 07:51:39 +0000 (+0800) Subject: BaseTools: Fix the different token with the same PCD X-Git-Tag: edk2-stable201903~1361 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5b73e17fb17c6935d894b0084f32421e717c247f BaseTools: Fix the different token with the same PCD If the different token with the same PCD names are used in the driver, build can pass. If the different token with the same PCD name are used in the different library, then the driver build will fail. The reason is that the driver autogen.c is not generated correctly for the second case. BaseTools should check the duplicated PCD name is the driver and its linked libraries. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 8a62cd22bd..8946e419a0 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -937,7 +937,7 @@ def CreateModulePcdCode(Info, AutoGenC, AutoGenH, Pcd): if Info.IsLibrary: PcdList = Info.LibraryPcdList else: - PcdList = Info.ModulePcdList + PcdList = Info.ModulePcdList + Info.LibraryPcdList PcdExCNameTest = 0 for PcdModule in PcdList: if PcdModule.Type in PCD_DYNAMIC_EX_TYPE_SET and Pcd.TokenCName == PcdModule.TokenCName: