]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix GenFds error doesn't break build.
authorDerek Lin <derek.lin2@hpe.com>
Tue, 18 Dec 2018 08:40:34 +0000 (16:40 +0800)
committerBobCF <bob.c.feng@intel.com>
Wed, 19 Dec 2018 05:24:18 +0000 (13:24 +0800)
Fix a bug because of b3497bad1221704a5dbc5da0b10f42625f1ad2ed.
Before the patch, when GenFds fail, the build continue and return success.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/Python/build/build.py

index cbbb291b2cd70d8301e1ad827aa35eb30b421727..97271e634e6c19856b7a577ba263d7b4e88af769 100644 (file)
@@ -3,6 +3,7 @@
 #\r
 #  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
 #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -1384,7 +1385,8 @@ class Build():
 \r
         # genfds\r
         if Target == 'fds':\r
-            GenFdsApi(AutoGenObject.GenFdsCommandDict, self.Db)\r
+            if GenFdsApi(AutoGenObject.GenFdsCommandDict, self.Db):\r
+                EdkLogger.error("build", COMMAND_FAILURE)\r
             return True\r
 \r
         # run\r
@@ -2122,7 +2124,8 @@ class Build():
                         # Generate FD image if there's a FDF file found\r
                         #\r
                         GenFdsStart = time.time()\r
-                        GenFdsApi(Wa.GenFdsCommandDict, self.Db)\r
+                        if GenFdsApi(Wa.GenFdsCommandDict, self.Db):\r
+                            EdkLogger.error("build", COMMAND_FAILURE)\r
 \r
                         #\r
                         # Create MAP file for all platform FVs after GenFds.\r