summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/build/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rw-r--r--BaseTools/Source/Python/build/build.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 5619638bd8..5c1fda1a93 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -304,6 +304,14 @@ def LaunchCommand(Command, WorkingDir):
if Proc.returncode != 0:
if type(Command) != type(""):
Command = " ".join(Command)
+ # print out the Response file and its content when make failure
+ RespFile = os.path.join(WorkingDir, 'OUTPUT', 'respfilelist.txt')
+ if os.path.isfile(RespFile):
+ f = open(RespFile)
+ RespContent = f.read()
+ f.close()
+ EdkLogger.info(RespContent)
+
EdkLogger.error("build", COMMAND_FAILURE, ExtraData="%s [%s]" % (Command, WorkingDir))
## The smallest unit that can be built in multi-thread build mode
@@ -775,6 +783,9 @@ class Build():
self.UniFlag = BuildOptions.Flag
self.BuildModules = []
+ if BuildOptions.CommandLength:
+ GlobalData.gCommandMaxLength = BuildOptions.CommandLength
+
# print dot character during doing some time-consuming work
self.Progress = Utils.Progressor()
@@ -1931,6 +1942,7 @@ def MyOptionParser():
Parser.add_option("--check-usage", action="store_true", dest="CheckUsage", default=False, help="Check usage content of entries listed in INF file.")
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")
Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: 'PcdName=Value' ")
+ Parser.add_option("-l", "--cmd-len", action="store", type="int", dest="CommandLength", help="Specify the maximum line length of build command. Default is 4096.")
(Opt, Args) = Parser.parse_args()
return (Opt, Args)