Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:

1. Fix !include issues
  2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers
  3. Fix building error C2733 when building C++ code.
  4. Add GCC46 tool chain definition
  5. Add new RVCT and RVCTLINUX tool chains

Signed-off-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2011-11-25 06:21:03 +00:00
parent c32dcd284c
commit 2bcc713e74
62 changed files with 503 additions and 3525 deletions

View File

@ -834,6 +834,59 @@ def ProcessLineExtender(LineList):
return NewList
## ProcessEdkComment
#
# Process EDK style comment in LineList: c style /* */ comment or cpp style // comment
#
#
# @param LineList The LineList need to be processed.
#
# @return LineList The LineList been processed.
# @return FirstPos Where Edk comment is first found, -1 if not found
#
def ProcessEdkComment(LineList):
FindEdkBlockComment = False
Count = 0
StartPos = -1
EndPos = -1
FirstPos = -1
while(Count < len(LineList)):
Line = LineList[Count].strip()
if Line.startswith("/*"):
#
# handling c style comment
#
StartPos = Count
while Count < len(LineList):
Line = LineList[Count].strip()
if Line.endswith("*/"):
if (Count == StartPos) and Line.strip() == '/*/':
Count = Count + 1
continue
EndPos = Count
FindEdkBlockComment = True
break
Count = Count + 1
if FindEdkBlockComment:
if FirstPos == -1:
FirstPos = StartPos
for Index in xrange(StartPos, EndPos+1):
LineList[Index] = ''
FindEdkBlockComment = False
elif Line.find("//") != -1:
#
# handling cpp style comment
#
LineList[Count] = Line.replace("//", '#')
if FirstPos == -1:
FirstPos = Count
Count = Count + 1
return LineList, FirstPos
## GetLibInstanceInfo
#
# Get the information from Library Instance INF file.