Skip to content

Commit

Permalink
py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module.
Browse files Browse the repository at this point in the history
So this setting could be used by other source files if needed.
  • Loading branch information
jimmo authored and dpgeorge committed Apr 5, 2020
1 parent 994c1dd commit c34e7b9
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion examples/natmod/btree/btree_c.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_BTREE (1)

#include "py/dynruntime.h"
Expand Down
1 change: 0 additions & 1 deletion examples/natmod/framebuf/framebuf.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_FRAMEBUF (1)

#include "py/dynruntime.h"
Expand Down
1 change: 0 additions & 1 deletion examples/natmod/uheapq/uheapq.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_UHEAPQ (1)

#include "py/dynruntime.h"
Expand Down
1 change: 0 additions & 1 deletion examples/natmod/urandom/urandom.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_URANDOM (1)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1)

Expand Down
1 change: 0 additions & 1 deletion examples/natmod/ure/ure.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_STACK_CHECK (1)
#define MICROPY_PY_URE (1)
#define MICROPY_PY_URE_MATCH_GROUPS (1)
Expand Down
1 change: 0 additions & 1 deletion examples/natmod/uzlib/uzlib.c
@@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_UZLIB (1)

#include "py/dynruntime.h"
Expand Down
4 changes: 4 additions & 0 deletions py/dynruntime.h
Expand Up @@ -33,6 +33,10 @@
#include "py/objstr.h"
#include "py/objtype.h"

#if !MICROPY_ENABLE_DYNRUNTIME
#error "dynruntime.h included in non-dynamic-module build."
#endif

#undef MP_ROM_QSTR
#undef MP_OBJ_QSTR_VALUE
#undef MP_OBJ_NEW_QSTR
Expand Down
1 change: 1 addition & 0 deletions py/dynruntime.mk
Expand Up @@ -27,6 +27,7 @@ CFLAGS += -std=c99
CFLAGS += -Os
CFLAGS += -Wall -Werror -DNDEBUG
CFLAGS += -DNO_QSTR
CFLAGS += -DMICROPY_ENABLE_DYNRUNTIME
CFLAGS += -DMP_CONFIGFILE='<$(CONFIG_H)>'
CFLAGS += -fpic -fno-common
CFLAGS += -U _FORTIFY_SOURCE # prevent use of __*_chk libc functions
Expand Down

0 comments on commit c34e7b9

Please sign in to comment.