From e74429bb17533c454b804e523ff5724344711ad2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 10 Dec 2018 09:05:23 -0700 Subject: buildman: Deal nicely with invalid build-status file The 'done' files created by buildman may end up being empty if buildman runs out of disk space while writing them. This error is then persistent, since even if disk space is reclaimed and the build retries, the empty file causes an exception in the builder thread. Deal with this silently by doing a rebuild. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/buildman/builderthread.py') diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index c84ba6acf11..b91634f3abb 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -156,7 +156,12 @@ class BuilderThread(threading.Thread): if result.already_done: # Get the return code from that build and use it with open(done_file, 'r') as fd: - result.return_code = int(fd.readline()) + try: + result.return_code = int(fd.readline()) + except ValueError: + # The file may be empty due to running out of disk space. + # Try a rebuild + result.return_code = RETURN_CODE_RETRY # Check the signal that the build needs to be retried if result.return_code == RETURN_CODE_RETRY: -- cgit v1.2.3 From 00beb2485f71ab23114b37ef47d136e269ef69f7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 7 Jan 2019 16:44:20 -0700 Subject: buildman: Add support for building with clang Add a -O option which allows building with clang. Signed-off-by: Simon Glass --- tools/buildman/builderthread.py | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/buildman/builderthread.py') diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py index b91634f3abb..6b156f152de 100644 --- a/tools/buildman/builderthread.py +++ b/tools/buildman/builderthread.py @@ -229,6 +229,7 @@ class BuilderThread(threading.Thread): config_args = ['%s_defconfig' % brd.target] config_out = '' args.extend(self.builder.toolchains.GetMakeArguments(brd)) + args.extend(self.toolchain.MakeArgs()) # If we need to reconfigure, do that now if do_config: -- cgit v1.2.3