File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,4 +238,12 @@ const mp_obj_module_t mp_module_ure = {
238238 .globals = (mp_obj_dict_t * )& mp_module_re_globals ,
239239};
240240
241+ // Source files #include'd here to make sure they're compiled in
242+ // only if module is enabled by config setting.
243+
244+ #define re1_5_fatal (x ) assert(!x)
245+ #include "re1.5/compilecode.c"
246+ #include "re1.5/dumpcode.c"
247+ #include "re1.5/recursiveloop.c"
248+
241249#endif //MICROPY_PY_URE
Original file line number Diff line number Diff line change @@ -114,9 +114,6 @@ PY_O_BASENAME = \
114114 ../extmod/modzlibd.o \
115115 ../extmod/modujson.o \
116116 ../extmod/modure.o \
117- ../extmod/re1.5/compilecode.o \
118- ../extmod/re1.5/dumpcode.o \
119- ../extmod/re1.5/recursiveloop.o \
120117
121118# prepend the build destination prefix to the py object files
122119PY_O = $(addprefix $(PY_BUILD ) /, $(PY_O_BASENAME ) )
@@ -169,7 +166,3 @@ $(PY_BUILD)/gc.o: CFLAGS += $(CSUPEROPT)
169166
170167# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
171168$(PY_BUILD ) /vm.o : CFLAGS += $(CSUPEROPT )
172-
173- # Additional options for 3rd-party libs
174-
175- $(PY_BUILD ) /../extmod/re1.5/recursiveloop.o : CFLAGS += "-Dre1_5_fatal(x)=assert(!x)"
You can’t perform that action at this time.
0 commit comments