[PATCH 6/9] buildman: Correct logic for adding a toolchain
Simon Glass
sjg at chromium.org
Fri Nov 8 16:23:47 CET 2024
If the toolchain is bad, it should not be added. Correct the logic for
this.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/buildman/toolchain.py | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index 0c8a4fa16eb..dab350fec31 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -327,16 +327,17 @@ class Toolchains:
toolchain = Toolchain(fname, test, verbose, priority, arch,
self.override_toolchain)
add_it = toolchain.ok
- if toolchain.arch in self.toolchains:
- add_it = (toolchain.priority <
- self.toolchains[toolchain.arch].priority)
if add_it:
- self.toolchains[toolchain.arch] = toolchain
- elif verbose:
- print(("Toolchain '%s' at priority %d will be ignored because "
- "another toolchain for arch '%s' has priority %d" %
- (toolchain.gcc, toolchain.priority, toolchain.arch,
- self.toolchains[toolchain.arch].priority)))
+ if toolchain.arch in self.toolchains:
+ add_it = (toolchain.priority <
+ self.toolchains[toolchain.arch].priority)
+ if add_it:
+ self.toolchains[toolchain.arch] = toolchain
+ elif verbose:
+ print(("Toolchain '%s' at priority %d will be ignored because "
+ "another toolchain for arch '%s' has priority %d" %
+ (toolchain.gcc, toolchain.priority, toolchain.arch,
+ self.toolchains[toolchain.arch].priority)))
def ScanPath(self, path, verbose):
"""Scan a path for a valid toolchain
--
2.34.1
More information about the U-Boot
mailing list