diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-03-21 17:06:47 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-03-27 10:40:21 +0800 |
commit | d590cce5cd9b9d31848eda4fcb62d1ab3fd05dfd (patch) | |
tree | 84d035d83f01f476fe9ffe6c935ce7bc16f57c94 /BaseTools/Source | |
parent | c17956e0eedce299ac253ac40238ce90a5e623e0 (diff) | |
download | edk2-platforms-d590cce5cd9b9d31848eda4fcb62d1ab3fd05dfd.tar.xz |
BaseTools: Fix build failure for DynamicEx Pcd used in the Library
Update DynExPcdTokenNumberMapping logic, currently even it is Library,
its self's Pcd is saved into ModulePcdList.
Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=434
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenC.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index c1d64cccfd..96b1459253 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -674,10 +674,8 @@ gModuleTypeHeaderFile = { def DynExPcdTokenNumberMapping(Info, AutoGenH):
ExTokenCNameList = []
PcdExList = []
- if Info.IsLibrary:
- PcdList = Info.LibraryPcdList
- else:
- PcdList = Info.ModulePcdList
+ # Even it is the Library, the PCD is saved in the ModulePcdList
+ PcdList = Info.ModulePcdList
for Pcd in PcdList:
if Pcd.Type in gDynamicExPcd:
ExTokenCNameList.append(Pcd.TokenCName)
@@ -1155,7 +1153,7 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): AutoGenH.Append('// Disabled the macros, as PcdToken and PcdGet/Set are not allowed in the case that more than one DynamicEx Pcds are different Guids but same CName.\n')
AutoGenH.Append('// #define %s %s\n' % (PcdTokenName, PcdExTokenName))
AutoGenH.Append('// #define %s LibPcdGetEx%s(&%s, %s)\n' % (GetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName))
- AutoGenH.Append('// #define %s LibPcdGetExSize(&%s, %s \n' % (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName))
+ AutoGenH.Append('// #define %s LibPcdGetExSize(&%s, %s)\n' % (GetModeSizeName,Pcd.TokenSpaceGuidCName, PcdTokenName))
if Pcd.DatumType == 'VOID*':
AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%s(&%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName))
AutoGenH.Append('// #define %s(SizeOfBuffer, Buffer) LibPcdSetEx%sS(&%s, %s, (SizeOfBuffer), (Buffer))\n' % (SetModeStatusName, DatumSizeLib, Pcd.TokenSpaceGuidCName, PcdTokenName))
|