git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@412 7335b...
[people/mcb30/basetools.git] / Source / Python / Common / InfClassObject.py
index 02f1b78..755ee17 100644 (file)
@@ -211,22 +211,9 @@ class Inf(InfObject):
         BuildOptions = {}\r
         for Arch in DataType.ARCH_LIST:\r
             for Item in self.Contents[Arch].BuildOptions:\r
-                ToolChainFamily = ''\r
-                Statement = ''\r
-                Option = ''\r
-                List = Item.split(DataType.TAB_EQUAL_SPLIT, 1)\r
-                if List[0].find(':') > -1:\r
-                    ToolChainFamily = CleanString(List[0][ : List[0].find(':')])\r
-                    Statement = CleanString(List[0][List[0].find(':') + 1 : ])\r
-                else:\r
-                    Statement = CleanString(List[0])                    \r
-                Option = CleanString(List[1])\r
-                MergeArches(BuildOptions, (ToolChainFamily, Statement, Option), Arch)\r
+                MergeArches(BuildOptions, GetBuildOption(Item), Arch)\r
         for Key in BuildOptions.keys():\r
-            BuildOption = BuildOptionClass()\r
-            BuildOption.ToolChainFamily = Key[0]\r
-            BuildOption.Statement = Key[1]\r
-            BuildOption.Option = Key[2]\r
+            BuildOption = BuildOptionClass(Key[0], Key[1], Key[2])\r
             BuildOption.SupArchList = BuildOptions[Key]\r
             self.Module.BuildOptions.append(BuildOption)    \r
         \r
@@ -555,7 +542,7 @@ class Inf(InfObject):
         print 'Specification =', m.Header.Specification\r
         print '\nBuildOptions =', m.BuildOptions\r
         for Item in m.BuildOptions:\r
-            print Item.ToolChainFamily, Item.Statement, Item.Option, Item.SupArchList\r
+            print Item.ToolChainFamily, Item.ToolChain, Item.Option, Item.SupArchList\r
         print '\nIncludes =', m.Includes\r
         for Item in m.Includes:\r
             print Item.FilePath, Item.SupArchList\r