diff mbox series

[v3,09/23] buildman: Drop the -a option

Message ID 20200318154302.16389-7-sjg@chromium.org
State Accepted
Commit 4e9162d519c83812624c327731048a93631dc194
Headers show
Series gitlab: Simplify the test script | expand

Commit Message

Simon Glass March 18, 2020, 3:42 p.m. UTC
There is no point in setting the ARCH environment variable since the
U-Boot build system no-longer uses it.

It seems safe to drop this feature since it was only recently added.

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

Changes in v3:
- Drop mention of -a in the README also

Changes in v2:
- Add a new patch to drop the -a option

 tools/buildman/README     |  4 ++--
 tools/buildman/cmdline.py |  2 --
 tools/buildman/control.py | 17 ++++++-----------
 3 files changed, 8 insertions(+), 15 deletions(-)

Comments

Tom Rini March 23, 2020, 1:13 p.m. UTC | #1
On Wed, Mar 18, 2020 at 09:42:47AM -0600, Simon Glass wrote:

> There is no point in setting the ARCH environment variable since the
> U-Boot build system no-longer uses it.
> 
> It seems safe to drop this feature since it was only recently added.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Tom Rini <trini at konsulko.com>
diff mbox series

Patch

diff --git a/tools/buildman/README b/tools/buildman/README
index 116a0ee545..4cf0114157 100644
--- a/tools/buildman/README
+++ b/tools/buildman/README
@@ -1072,8 +1072,8 @@  Other options
 
 Buildman has various other command-line options. Try --help to see them.
 
-To find out what architecture or toolchain prefix buildman will use for a build,
-see the -a and -A options.
+To find out what toolchain prefix buildman will use for a build, use the -A
+option.
 
 To request that compiler warnings be promoted to errors, use -E. This passes the
 -Werror flag to the compiler. Note that the build can still produce warnings
diff --git a/tools/buildman/cmdline.py b/tools/buildman/cmdline.py
index f387aeb1cf..17ea015a95 100644
--- a/tools/buildman/cmdline.py
+++ b/tools/buildman/cmdline.py
@@ -13,8 +13,6 @@  def ParseArgs():
             args: command lin arguments
     """
     parser = OptionParser()
-    parser.add_option('-a', '--print-arch', action='store_true',
-          help='Print the architecture for a board (ARCH=)')
     parser.add_option('-A', '--print-prefix', action='store_true',
           help='Print the tool-chain prefix for a board (CROSS_COMPILE=)')
     parser.add_option('-b', '--branch', type='string',
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 7d31863c63..5ddc598c95 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -85,16 +85,15 @@  def ShowActions(series, why_selected, boards_selected, builder, options,
         for warning in board_warnings:
             print(col.Color(col.YELLOW, warning))
 
-def ShowToolchainInfo(boards, toolchains, print_arch, print_prefix):
+def ShowToolchainPrefix(boards, toolchains):
     """Show information about a the tool chain used by one or more boards
 
-    The function checks that all boards use the same toolchain.
+    The function checks that all boards use the same toolchain, then prints
+    the correct value for CROSS_COMPILE.
 
     Args:
         boards: Boards object containing selected boards
         toolchains: Toolchains object containing available toolchains
-        print_arch: True to print ARCH value
-        print_prefix: True to print CROSS_COMPILE value
 
     Return:
         None on success, string error message otherwise
@@ -107,10 +106,7 @@  def ShowToolchainInfo(boards, toolchains, print_arch, print_prefix):
         return 'Supplied boards must share one toolchain'
         return False
     tc = tc_set.pop()
-    if print_arch:
-        print(tc.GetEnvArgs(toolchain.VAR_ARCH))
-    if print_prefix:
-        print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
+    print(tc.GetEnvArgs(toolchain.VAR_CROSS_COMPILE))
     return None
 
 def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
@@ -206,9 +202,8 @@  def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
     if not len(selected):
         sys.exit(col.Color(col.RED, 'No matching boards found'))
 
-    if options.print_arch or options.print_prefix:
-        err = ShowToolchainInfo(boards, toolchains, options.print_arch,
-                                options.print_prefix)
+    if options.print_prefix:
+        err = ShowToolchainInfo(boards, toolchains)
         if err:
             sys.exit(col.Color(col.RED, err))
         return 0