BaseTools: Fix the bug for CArray PCD override in command line

This patch updated the CArray PCD override format from B"{}" to H"{}"
which align to build spec. Besides, it also do the clean up for the
function BuildOptionPcdValueFormat.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu
2017-05-12 12:12:23 +08:00
parent 7256bd55e9
commit db55dac775
4 changed files with 39 additions and 54 deletions

View File

@ -1,7 +1,7 @@
## @file
# Create makefile for MS nmake and GNU make
#
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@ -1453,7 +1453,15 @@ class TopLevelMakefile(BuildFile):
if GlobalData.BuildOptionPcd:
for index, option in enumerate(GlobalData.gCommand):
if "--pcd" == option and GlobalData.gCommand[index+1]:
ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')
if pcdValue.startswith('H'):
pcdValue = 'H' + '"' + pcdValue[1:] + '"'
ExtraOption += " --pcd " + pcdName + '=' + pcdValue
elif pcdValue.startswith('L'):
pcdValue = 'L' + '"' + pcdValue[1:] + '"'
ExtraOption += " --pcd " + pcdName + '=' + pcdValue
else:
ExtraOption += " --pcd " + GlobalData.gCommand[index+1]
MakefileName = self._FILE_NAME_[self._FileType]
SubBuildCommandList = []