Anastasia Klimchuk submitted this change.

View Change



4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Anastasia Klimchuk: Looks good to me, approved
meson: improve error message for unsupported systems

This adds the current and supported system information to the error
message when an unsupported programmer is requested, making it easier
to tell what the incompatibility is.

TEST=(in mingw-ucrt64) meson setup -Dprogrammer=ni845x_spi build,
error message says the programmer needs `['windows']/['x86']` but
the system is `windows/x86_64`.

Change-Id: I6c8a8b47505f7a239160d565463ce7262fe5d5d6
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75490
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
---
M meson.build
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 9428e08..77d941e 100644
--- a/meson.build
+++ b/meson.build
@@ -561,7 +561,13 @@

if selected_hard
if not available
- error(p_name + ' selected but not supported on this platform')
+ error('programmer @0@ was selected but is not supported on this platform (needs @1@/@2@, but system is @3@/@4@)'.format(
+ p_name,
+ p_data.get('systems'),
+ p_data.get('cpu_families'),
+ host_machine.system(),
+ host_machine.cpu_family()
+ ))
elif not deps_found
error(p_name + ' selected but dependency ' + not_found_dep +'not found')
else

To view, visit change 75490. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6c8a8b47505f7a239160d565463ce7262fe5d5d6
Gerrit-Change-Number: 75490
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Marheine <pmarheine@chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Miklós Márton <martonmiklosqdev@gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged