diff options
author | Liming Gao <liming.gao@intel.com> | 2017-12-22 20:46:15 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2017-12-25 11:05:47 +0800 |
commit | 8518bf0b92a78938341a2752a0044f04336668cc (patch) | |
tree | 42cb756c581e15ff9a505c27f216d9f0331509de /BaseTools/Source/Python/AutoGen/GenC.py | |
parent | 34952f493c24c02f5eba6ae86ed758d3311cddb1 (diff) | |
download | edk2-8518bf0b92a78938341a2752a0044f04336668cc.tar.gz edk2-8518bf0b92a78938341a2752a0044f04336668cc.tar.bz2 edk2-8518bf0b92a78938341a2752a0044f04336668cc.zip |
BaseTools: Support Structure PCD value inherit between the different SKUs
https://bugzilla.tianocore.org/show_bug.cgi?id=543
Structure PCD field value can inherit between the different SKUIds.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Feng Bob C <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/GenC.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenC.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 2bc4fbdb6e..6b95cd47c2 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1677,6 +1677,9 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH): if Pcd.Type in gDynamicExPcd and Pcd.TokenSpaceGuidCName not in TokenSpaceList:
TokenSpaceList += [Pcd.TokenSpaceGuidCName]
+ SkuMgr = Info.Workspace.Platform.SkuIdMgr
+ AutoGenH.Append("\n// Definition of SkuId Array\n")
+ AutoGenH.Append("extern UINT64 _gPcd_SkuId_Array[];\n")
# Add extern declarations to AutoGen.h if one or more Token Space GUIDs were found
if TokenSpaceList <> []:
AutoGenH.Append("\n// Definition of PCD Token Space GUIDs used in this module\n\n")
@@ -1694,6 +1697,8 @@ def CreatePcdCode(Info, AutoGenC, AutoGenH): CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd)
DynExPcdTokenNumberMapping (Info, AutoGenH)
else:
+ AutoGenC.Append("\n// Definition of SkuId Array\n")
+ AutoGenC.Append("GLOBAL_REMOVE_IF_UNREFERENCED UINT64 _gPcd_SkuId_Array[] = %s;\n" % SkuMgr.DumpSkuIdArrary())
if Info.ModulePcdList:
AutoGenH.Append("\n// Definition of PCDs used in this module\n")
AutoGenC.Append("\n// Definition of PCDs used in this module\n")
|