Browse Source

py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module.

So this setting could be used by other source files if needed.
pull/5861/head
Jim Mussared 5 years ago
committed by Damien George
parent
commit
c34e7b9d4c
  1. 1
      examples/natmod/btree/btree_c.c
  2. 1
      examples/natmod/framebuf/framebuf.c
  3. 1
      examples/natmod/uheapq/uheapq.c
  4. 1
      examples/natmod/urandom/urandom.c
  5. 1
      examples/natmod/ure/ure.c
  6. 1
      examples/natmod/uzlib/uzlib.c
  7. 4
      py/dynruntime.h
  8. 1
      py/dynruntime.mk

1
examples/natmod/btree/btree_c.c

@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_BTREE (1)
#include "py/dynruntime.h"

1
examples/natmod/framebuf/framebuf.c

@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_FRAMEBUF (1)
#include "py/dynruntime.h"

1
examples/natmod/uheapq/uheapq.c

@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_UHEAPQ (1)
#include "py/dynruntime.h"

1
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)

1
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)

1
examples/natmod/uzlib/uzlib.c

@ -1,4 +1,3 @@
#define MICROPY_ENABLE_DYNRUNTIME (1)
#define MICROPY_PY_UZLIB (1)
#include "py/dynruntime.h"

4
py/dynruntime.h

@ -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

1
py/dynruntime.mk

@ -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

Loading…
Cancel
Save