Fixed build issue when building individual module with unsupported architectures.
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 22 Oct 2007 09:05:25 +0000 (09:05 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 22 Oct 2007 09:05:25 +0000 (09:05 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@844 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/build/build.py

index d6a58ce..6db895e 100644 (file)
@@ -818,8 +818,8 @@ class Build():
                 self.Progress.Start("Generating code/makefile for platform")\r
                 AutoGenResult = PlatformAutoGen.New(self.Ewb, Platform, BuildTarget,\r
                                                     ToolChain, Arch, CreateDepModuleAutoGenObject)\r
-\r
-\r
+            if AutoGenResult == None:\r
+                return\r
 \r
             # for target which must generate AutoGen code and makefile\r
             AutoGenResult.CreateCodeFile(CreateDepModuleCodeFile)\r
@@ -840,6 +840,8 @@ class Build():
             else:\r
                 AutoGenResult = PlatformAutoGen.New(self.Ewb, Platform, BuildTarget,\r
                                                     ToolChain, Arch, False)\r
+            if AutoGenResult == None:\r
+                return\r
 \r
         EdkLogger.info("")\r
         BuildCommand = AutoGenResult.GetBuildCommand()\r
@@ -884,6 +886,8 @@ class Build():
         for BuildTarget in self.BuildTargetList:\r
             for ToolChain in self.ToolChainList:\r
                 Pa = PlatformAutoGen.New(self.Ewb, self.PlatformFile, BuildTarget, ToolChain, self.ArchList)\r
+                if Pa == None:\r
+                    continue\r
                 # multi-thread exit flag\r
                 ExitFlag = threading.Event()\r
                 ExitFlag.clear()\r
@@ -891,6 +895,8 @@ class Build():
                     for Module in Pa.Platform[Arch].Modules:\r
                         # Get ModuleAutoGen object to generate C code file and makefile\r
                         Ma = ModuleAutoGen.New(self.Ewb, self.PlatformFile, Module, BuildTarget, ToolChain, Arch)\r
+                        if Ma == None:\r
+                            continue\r
                         # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'\r
                         if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:\r
                             # for target which must generate AutoGen code and makefile\r