summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-05-12 23:14:52 +0100
committerDamien George <damien.p.george@gmail.com>2014-05-12 23:14:52 +0100
commitcc97446ca588d15e67cc126035802e183fab70a9 (patch)
treed96fa1b51eee4ed6f36bc45a4c5579d7f27ee7fb /unix
parent915197a8f98d46c2e64edcec7c22de3effb92f0a (diff)
downloadmicropython-cc97446ca588d15e67cc126035802e183fab70a9.tar.gz
micropython-cc97446ca588d15e67cc126035802e183fab70a9.zip
unix: Implement -O option to turn off __debug__ flag.
Diffstat (limited to 'unix')
-rw-r--r--unix/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c
index 8678a1a4d5..1c53461a79 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -335,6 +335,9 @@ int main(int argc, char **argv) {
a += 1;
} else if (strcmp(argv[a], "-v") == 0) {
mp_verbose_flag++;
+ } else if (strcmp(argv[a], "-O") == 0) {
+ // optimisation; sets __debug__ to False
+ mp_set_debug(false);
} else {
return usage(argv);
}