diff options
| author | Simon Glass <[email protected]> | 2024-11-08 08:23:47 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-11-19 10:04:47 -0600 |
| commit | eae1eb0e860fe6380906cace0877ef956683c615 (patch) | |
| tree | 0660fef3453e6b2291bdf8232d54bc52a6056693 /tools | |
| parent | a79a9ebee0b3477c57869d7ca424fc0618d1c07b (diff) | |
buildman: Correct logic for adding a toolchain
If the toolchain is bad, it should not be added. Correct the logic for
this.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/buildman/toolchain.py | 19 |
1 files 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 |
