[PATCH v4 66/83] buildman: Move setting of toolchain arguments to _build_args()

Simon Glass sjg at chromium.org
Thu Jul 20 01:49:14 CEST 2023


Move a few more pieces to this new function.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 tools/buildman/builderthread.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 47ebf4dcdd90..e7d9a29d03ef 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -137,11 +137,12 @@ class BuilderThread(threading.Thread):
         return self.builder.do_make(commit, brd, stage, cwd, *args,
                 **kwargs)
 
-    def _build_args(self, args):
+    def _build_args(self, args, brd):
         """Set up arguments to the args list based on the settings
 
         Args:
             args (list of str): List of string arguments to add things to
+            brd (Board): Board to create arguments for
         """
         if self.builder.verbose_build:
             args.append('V=1')
@@ -158,6 +159,8 @@ class BuilderThread(threading.Thread):
             args.append('NO_LTO=1')
         if self.builder.reproducible_builds:
             args.append('SOURCE_DATE_EPOCH=0')
+        args.extend(self.builder.toolchains.GetMakeArguments(brd))
+        args.extend(self.toolchain.MakeArgs())
 
     def run_commit(self, commit_upto, brd, work_dir, do_config, config_only,
                   force_build, force_build_failures, work_in_output,
@@ -274,11 +277,9 @@ class BuilderThread(threading.Thread):
                         src_dir = os.getcwd()
                     else:
                         args.append(f'O={out_rel_dir}')
-                self._build_args(args)
+                self._build_args(args, brd)
                 config_args = [f'{brd.target}_defconfig']
                 config_out = ''
-                args.extend(self.builder.toolchains.GetMakeArguments(brd))
-                args.extend(self.toolchain.MakeArgs())
 
                 # Remove any output targets. Since we use a build directory that
                 # was previously used by another board, it may have produced an
-- 
2.41.0.487.g6d72f3e995-goog



More information about the U-Boot mailing list