code_size_compare.py: add prompt for unsupported arch and config
Add prompt message for a series of supported combination of
architecture and configuration when someone tries unsupported
combinations.
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/scripts/code_size_compare.py b/scripts/code_size_compare.py
index e61236a..b8f2942 100755
--- a/scripts/code_size_compare.py
+++ b/scripts/code_size_compare.py
@@ -71,6 +71,14 @@
infer build command for code size measurement.
"""
+ SupportedArchConfig = [
+ "-a " + SupportedArch.AARCH64.value + " -c " + SupportedConfig.DEFAULT.value,
+ "-a " + SupportedArch.AARCH32.value + " -c " + SupportedConfig.DEFAULT.value,
+ "-a " + SupportedArch.X86_64.value + " -c " + SupportedConfig.DEFAULT.value,
+ "-a " + SupportedArch.X86.value + " -c " + SupportedConfig.DEFAULT.value,
+ "-a " + SupportedArch.ARMV8_M.value + " -c " + SupportedConfig.TFM_MEDIUM.value,
+ ]
+
def __init__(self, arch: str, config: str) -> None:
"""
arch: architecture to measure code size on.
@@ -96,6 +104,9 @@
else:
print("Unsupported architecture: {} and configurations: {}"
.format(self.arch, self.config))
+ print("\nPlease use supported combination of architecture and configuration:")
+ for comb in CodeSizeInfo.SupportedArchConfig:
+ print(comb)
sys.exit(1)