Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d....@intel.com> --- BaseTools/Source/Python/AutoGen/GenC.py | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 9bdb036..e73ba79 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1319,11 +1319,13 @@ def CreateGuidDefinitionCode(Info, AutoGenC, AutoGenH): if Info.GuidList: AutoGenC.Append("\n// Guids\n") + AutoGenH.Append("\n// Guids\n") # # GUIDs # for Key in Info.GuidList: AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.GuidList[Key])) + AutoGenH.Append('extern %s %s;\n' % (GuidType, Key)) ## Create code for protocol # @@ -1342,11 +1344,13 @@ def CreateProtocolDefinitionCode(Info, AutoGenC, AutoGenH): if Info.ProtocolList: AutoGenC.Append("\n// Protocols\n") + AutoGenH.Append("\n// Protocols\n") # # Protocol GUIDs # for Key in Info.ProtocolList: AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.ProtocolList[Key])) + AutoGenH.Append('extern %s %s;\n' % (GuidType, Key)) ## Create code for PPI # @@ -1365,11 +1369,13 @@ def CreatePpiDefinitionCode(Info, AutoGenC, AutoGenH): if Info.PpiList: AutoGenC.Append("\n// PPIs\n") + AutoGenH.Append("\n// PPIs\n") # # PPI GUIDs # for Key in Info.PpiList: AutoGenC.Append('GLOBAL_REMOVE_IF_UNREFERENCED %s %s = %s;\n' % (GuidType, Key, Info.PpiList[Key])) + AutoGenH.Append('extern %s %s;\n' % (GuidType, Key)) ## Create code for PCD # -- 1.9.5.msysgit.0 ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel