Sync BaseTool trunk (version r2670) into EDKII BaseTools.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gao, Liming <liming.gao@intel.com> Reviewed-by: Liu, Yingke D (yingke.d.liu@intel.com) git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15605 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -17,4 +17,4 @@
|
||||
Build version information
|
||||
'''
|
||||
|
||||
gBUILD_VERSION = "Build 2649"
|
||||
gBUILD_VERSION = "Build 2670"
|
||||
|
@ -2,7 +2,7 @@
|
||||
# This file is used to define common string related functions used in parsing
|
||||
# process
|
||||
#
|
||||
# Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are licensed and made available
|
||||
# under the terms and conditions of the BSD License which accompanies this
|
||||
@ -937,3 +937,29 @@ def SplitPcdEntry(String):
|
||||
return ['', '', ''], False
|
||||
|
||||
return ['', '', ''], False
|
||||
|
||||
## Check if two arches matched?
|
||||
#
|
||||
# @param Arch1
|
||||
# @param Arch2
|
||||
#
|
||||
def IsMatchArch(Arch1, Arch2):
|
||||
if 'COMMON' in Arch1 or 'COMMON' in Arch2:
|
||||
return True
|
||||
if isinstance(Arch1, basestring) and isinstance(Arch2, basestring):
|
||||
if Arch1 == Arch2:
|
||||
return True
|
||||
|
||||
if isinstance(Arch1, basestring) and isinstance(Arch2, list):
|
||||
return Arch1 in Arch2
|
||||
|
||||
if isinstance(Arch2, basestring) and isinstance(Arch1, list):
|
||||
return Arch2 in Arch1
|
||||
|
||||
if isinstance(Arch1, list) and isinstance(Arch2, list):
|
||||
for Item1 in Arch1:
|
||||
for Item2 in Arch2:
|
||||
if Item1 == Item2:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# This file is used to parse a Module file of .PKG file
|
||||
#
|
||||
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials are licensed and made available
|
||||
# under the terms and conditions of the BSD License which accompanies this
|
||||
@ -20,6 +20,7 @@ from xml.dom import minidom
|
||||
from Library.String import ConvertNEToNOTEQ
|
||||
from Library.String import ConvertNOTEQToNE
|
||||
from Library.String import GetStringOfList
|
||||
from Library.String import IsMatchArch
|
||||
from Library.Xml.XmlRoutines import XmlElement
|
||||
from Library.Xml.XmlRoutines import XmlAttribute
|
||||
from Library.Xml.XmlRoutines import XmlNode
|
||||
@ -128,9 +129,11 @@ class BinaryFileXml(object):
|
||||
pass
|
||||
NodeList = []
|
||||
FilenameList = BinaryFile.GetFileNameList()
|
||||
SupportArch = None
|
||||
for Filename in FilenameList:
|
||||
Tmp = FilenameXml()
|
||||
NodeList.append(Tmp.ToXml(Filename, 'Filename'))
|
||||
SupportArch = Filename.SupArchList
|
||||
|
||||
if GlobalData.gIS_BINARY_INF:
|
||||
AsBuildList = BinaryFile.GetAsBuiltList()
|
||||
@ -142,12 +145,14 @@ class BinaryFileXml(object):
|
||||
AsBuiltNodeList = []
|
||||
|
||||
for Pcd in PatchPcdValueList:
|
||||
Tmp = PcdEntryXml()
|
||||
AsBuiltNodeList.append(Tmp.ToXml4(Pcd, 'PatchPcdValue'))
|
||||
if IsMatchArch(Pcd.SupArchList, SupportArch):
|
||||
Tmp = PcdEntryXml()
|
||||
AsBuiltNodeList.append(Tmp.ToXml4(Pcd, 'PatchPcdValue'))
|
||||
|
||||
for Pcd in PcdExList:
|
||||
Tmp = PcdEntryXml()
|
||||
AsBuiltNodeList.append(Tmp.ToXml4(Pcd, 'PcdExValue'))
|
||||
if IsMatchArch(Pcd.SupArchList, SupportArch):
|
||||
Tmp = PcdEntryXml()
|
||||
AsBuiltNodeList.append(Tmp.ToXml4(Pcd, 'PcdExValue'))
|
||||
|
||||
GuiVerElemList = []
|
||||
for LibGuidVer in LibGuidVerList:
|
||||
|
Reference in New Issue
Block a user