BaseTools: Fixed the mis-using strip() function issue.
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2003 lstrip(parameter) do the match based on the char in parameter but not only the whole parameter string. In GenMake line 1082, CmdSign.lstrip('/Fo') will strip the '/' or 'F' or 'o' on the left of CmdSign. This is not expected. This patch is going to fix such issue. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -793,7 +793,10 @@ class GenFdsGlobalVariable:
|
||||
def GetPcdValue (PcdPattern):
|
||||
if PcdPattern is None:
|
||||
return None
|
||||
PcdPair = PcdPattern.lstrip('PCD(').rstrip(')').strip().split('.')
|
||||
if PcdPattern.startswith('PCD('):
|
||||
PcdPair = PcdPattern[4:].rstrip(')').strip().split('.')
|
||||
else:
|
||||
PcdPair = PcdPattern.strip().split('.')
|
||||
TokenSpace = PcdPair[0]
|
||||
TokenCName = PcdPair[1]
|
||||
|
||||
|
Reference in New Issue
Block a user