summaryrefslogtreecommitdiffstatshomepage
path: root/mpy-cross/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'mpy-cross/main.c')
-rw-r--r--mpy-cross/main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mpy-cross/main.c b/mpy-cross/main.c
index 7ab95149c7..16f749ae4d 100644
--- a/mpy-cross/main.c
+++ b/mpy-cross/main.c
@@ -130,7 +130,7 @@ static int usage(char **argv) {
"Target specific options:\n"
"-msmall-int-bits=number : set the maximum bits used to encode a small-int\n"
"-march=<arch> : set architecture for native emitter;\n"
- " x86, x64, armv6, armv6m, armv7m, armv7em, armv7emsp, armv7emdp, xtensa, xtensawin, rv32imc, debug\n"
+ " x86, x64, armv6, armv6m, armv7m, armv7em, armv7emsp, armv7emdp, xtensa, xtensawin, rv32imc, host, debug\n"
"\n"
"Implementation specific options:\n", argv[0]
);
@@ -350,6 +350,15 @@ MP_NOINLINE int main_(int argc, char **argv) {
}
}
+ #if MICROPY_EMIT_NATIVE
+ if ((MP_STATE_VM(default_emit_opt) == MP_EMIT_OPT_NATIVE_PYTHON
+ || MP_STATE_VM(default_emit_opt) == MP_EMIT_OPT_VIPER)
+ && mp_dynamic_compiler.native_arch == MP_NATIVE_ARCH_NONE) {
+ mp_printf(&mp_stderr_print, "arch not specified\n");
+ exit(1);
+ }
+ #endif
+
if (input_file == NULL) {
mp_printf(&mp_stderr_print, "no input file\n");
exit(1);