diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2018-02-28 13:59:18 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-02-28 16:45:31 +0800 |
commit | 06140766c13fb9288a922990ffde77fca93fc71d (patch) | |
tree | 7b9a7afa6192dfb260456ff00a92f23b77893c06 /BaseTools/Source/Python/AutoGen | |
parent | a68749f39a2e04ef68e5656b7b72fca25a2e23dc (diff) | |
download | edk2-06140766c13fb9288a922990ffde77fca93fc71d.tar.gz edk2-06140766c13fb9288a922990ffde77fca93fc71d.tar.bz2 edk2-06140766c13fb9288a922990ffde77fca93fc71d.zip |
BaseTools: Fixed the pcd value override issue.
1. the issue in the overriding value from command line.
2. dec fully value < dec field assign value <
dsc fully value < dsc field assign value
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenMake.py | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 4b924d21e0..1b0cf17e25 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -1551,26 +1551,25 @@ class TopLevelMakefile(BuildFile): if GlobalData.gIgnoreSource:
ExtraOption += " --ignore-sources"
- if GlobalData.BuildOptionPcd:
- for index, option in enumerate(GlobalData.gCommand):
- if "--pcd" == option and GlobalData.gCommand[index+1]:
- pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')
- for Item in GlobalData.BuildOptionPcd:
- if '.'.join(Item[0:2]) == pcdName:
- pcdValue = Item[2]
- if pcdValue.startswith('L') or pcdValue.startswith('"'):
- pcdValue, Size = ParseFieldValue(pcdValue)
- NewVal = '{'
- for S in range(Size):
- NewVal = NewVal + '0x%02X' % ((pcdValue >> S * 8) & 0xff)
- NewVal += ','
- pcdValue = NewVal[:-1] + '}'
- break
- if pcdValue.startswith('{'):
- pcdValue = 'H' + '"' + pcdValue + '"'
- ExtraOption += " --pcd " + pcdName + '=' + pcdValue
- else:
- ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
+ for index, option in enumerate(GlobalData.gCommand):
+ if "--pcd" == option and GlobalData.gCommand[index+1]:
+ pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')
+ for Item in GlobalData.BuildOptionPcd:
+ if '.'.join(Item[0:2]) == pcdName:
+ pcdValue = Item[2]
+ if pcdValue.startswith('L') or pcdValue.startswith('"'):
+ pcdValue, Size = ParseFieldValue(pcdValue)
+ NewVal = '{'
+ for S in range(Size):
+ NewVal = NewVal + '0x%02X' % ((pcdValue >> S * 8) & 0xff)
+ NewVal += ','
+ pcdValue = NewVal[:-1] + '}'
+ break
+ if pcdValue.startswith('{'):
+ pcdValue = 'H' + '"' + pcdValue + '"'
+ ExtraOption += " --pcd " + pcdName + '=' + pcdValue
+ else:
+ ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
MakefileName = self._FILE_NAME_[self._FileType]
SubBuildCommandList = []
|