diff options
author | Feng, YunhuaX </o=Intel/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=Feng, YunhuaX4e1> | 2018-03-01 20:42:01 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-03-03 09:20:12 +0800 |
commit | 1fa7fdf6eada55316d7b5b45a0d116625d697fc5 (patch) | |
tree | a876baa36d55e726306728770fc8ad49bb9e7487 /BaseTools/Source/Python | |
parent | 8805bd904abd2f331d91cc4ae26fe3ee75a1fd0d (diff) | |
download | edk2-1fa7fdf6eada55316d7b5b45a0d116625d697fc5.tar.gz edk2-1fa7fdf6eada55316d7b5b45a0d116625d697fc5.tar.bz2 edk2-1fa7fdf6eada55316d7b5b45a0d116625d697fc5.zip |
BaseTools: Dsc/Fdf conditional statement parse issue
Set PCD value with --pcd argument not replace DSC/Fdf PCD value.
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')
-rw-r--r-- | BaseTools/Source/Python/GenFds/FdfParser.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/Workspace/MetaFileParser.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index 44a3564c7c..fc2b409847 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -925,6 +925,10 @@ class FdfParser: MacroDict.update(GlobalData.gGlobalDefines)
MacroDict.update(GlobalData.gCommandLineDefines)
+ if GlobalData.BuildOptionPcd:
+ for Item in GlobalData.BuildOptionPcd:
+ PcdName, TmpValue = Item.split("=")
+ MacroDict[PcdName.strip()] = TmpValue
# Highest priority
return MacroDict
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 95ea6fb45a..6809003d98 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1243,6 +1243,10 @@ class DscParser(MetaFileParser): # PCD cannot be referenced in macro definition
if self._ItemType not in [MODEL_META_DATA_DEFINE, MODEL_META_DATA_GLOBAL_DEFINE]:
Macros.update(self._Symbols)
+ if GlobalData.BuildOptionPcd:
+ for Item in GlobalData.BuildOptionPcd:
+ PcdName, TmpValue = Item.split("=")
+ Macros[PcdName.strip()] = TmpValue
return Macros
def _PostProcess(self):
|