unix: Add option to only compile, and not execute code.
diff --git a/unix/main.c b/unix/main.c
index bcc5ffc..f18e40a 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -29,7 +29,8 @@
 #include <readline/history.h>
 #endif
 
-// Default emit options
+// Command line options, with their defaults
+bool compile_only = false;
 uint emit_opt = MP_EMIT_OPT_NONE;
 
 #if MICROPY_ENABLE_GC
@@ -87,6 +88,10 @@
         return;
     }
 
+    if (compile_only) {
+        return;
+    }
+
     // execute it
     nlr_buf_t nlr;
     if (nlr_push(&nlr) == 0) {
@@ -226,6 +231,7 @@
 );
     int impl_opts_cnt = 0;
     printf(
+"  compile-only                 -- parse and compile only\n"
 "  emit={bytecode,native,viper} -- set the default code emitter\n"
 );
     impl_opts_cnt++;
@@ -273,6 +279,8 @@
                     exit(usage(argv));
                 }
                 if (0) {
+                } else if (strcmp(argv[a + 1], "compile-only") == 0) {
+                    compile_only = true;
                 } else if (strcmp(argv[a + 1], "emit=bytecode") == 0) {
                     emit_opt = MP_EMIT_OPT_BYTE_CODE;
                 } else if (strcmp(argv[a + 1], "emit=native") == 0) {