BaseTools: Add *B Flag for the field that from command line
authorYonghong Zhu <yonghong.zhu@intel.com>
Fri, 23 Feb 2018 05:05:34 +0000 (13:05 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 25 Feb 2018 08:05:20 +0000 (16:05 +0800)
For structure PCD, the field value may override in the command line,
so in the report when we print the field info we add *B Flag for those
field.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/build/BuildReport.py

index 53d0039c51495fccd7032bafd771f8c8289dc52a..21144991bf796b725f6af878a4bf1d33e79af68e 100644 (file)
@@ -1236,14 +1236,10 @@ class PcdReport(object):
     def PrintStructureInfo(self, File, Struct):\r
         NewInfo = collections.OrderedDict()\r
         for Key, Value in Struct.items():\r
-            if Key not in NewInfo:\r
-                NewInfo[Key] = Value[0]\r
+            if Value[1] and 'build command options' in Value[1]:\r
+                FileWrite(File, '    *B  %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))\r
             else:\r
-                del NewInfo[Key]\r
-                NewInfo[Key] = Value[0]\r
-        if NewInfo:\r
-            for item in NewInfo:\r
-                FileWrite(File, '        %-*s = %s' % (self.MaxLen + 4, '.' + item, NewInfo[item]))\r
+                FileWrite(File, '        %-*s = %s' % (self.MaxLen + 4, '.' + Key, Value[0]))\r
 \r
     def StrtoHex(self, value):\r
         try:\r