diff options
author | Yunhua Feng <yunhuax.feng@intel.com> | 2018-02-07 21:37:26 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-02-09 08:34:36 +0800 |
commit | 9efe8d604049b1d2f320ae5c40cd925d6504bceb (patch) | |
tree | 6ad9ffbc28840823a4882c4eccd96c04ea61afe5 /BaseTools/Source/Python/Workspace | |
parent | 2052cb675f1fdbc77f916422fdf5c2da29741169 (diff) | |
download | edk2-9efe8d604049b1d2f320ae5c40cd925d6504bceb.tar.gz edk2-9efe8d604049b1d2f320ae5c40cd925d6504bceb.tar.bz2 edk2-9efe8d604049b1d2f320ae5c40cd925d6504bceb.zip |
BaseTools: Update Expression.py for string comparison and MACRO replace issue
1. Fix string comparison incorrect issue, we expected "ABC" is greater than
"AAD" since the second char 'B' is greater than 'A'.
2. fix MACRO not replace issue.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DscBuildData.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 0da3efbb43..75b877a5aa 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -808,7 +808,7 @@ class DscBuildData(PlatformBuildClassObject): PkgSet.update(ModuleData.Packages)
self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain,PkgSet)
-
+ self._GuidDict.update(GlobalData.gPlatformPcds)
if (PcdCName, TokenSpaceGuid) not in self._DecPcds:
EdkLogger.error('build', PARSER_ERROR,
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 57642de4ee..95ea6fb45a 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1994,6 +1994,7 @@ class DecParser(MetaFileParser): PcdValue = ValueList[0]
if PcdValue:
try:
+ self._GuidDict.update(self._AllPcdDict)
ValueList[0] = ValueExpressionEx(ValueList[0], ValueList[1], self._GuidDict)(True)
except BadExpression, Value:
EdkLogger.error('Parser', FORMAT_INVALID, Value, ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)
|