summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/GenMake.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-05-12 12:12:23 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-05-12 13:36:20 +0800
commitdb55dac77579fa2722e4457bfc4369f98b8ff52a (patch)
tree2693024292c3c5d526941b29e2c8bc0c2df21aa5 /BaseTools/Source/Python/AutoGen/GenMake.py
parent7256bd55e9883bbdfda32733eb533ddeccd3e2da (diff)
downloadedk2-db55dac77579fa2722e4457bfc4369f98b8ff52a.tar.gz
edk2-db55dac77579fa2722e4457bfc4369f98b8ff52a.tar.bz2
edk2-db55dac77579fa2722e4457bfc4369f98b8ff52a.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/GenMake.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/GenMake.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
index ac24bd8bbe..0f3ddd5dd4 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -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 = []