Skip to content

Commit b603fa3

Browse files
pi-anldpgeorge
authored andcommitted
py/mkrules.mk: Reset USER_C_MODULES when building mpy-cross dependency.
When a port automatically compiles `mpy-cross`, if `USER_C_MODULES` is provided by the user on the command line then it is also applied to the `mpy-cross` build. That can lead to build errors if the path is relative and not found when building `mpy-cross`. Fix that by explicitly resetting `USER_C_MODULES` when invoking the `mpy-cross` build. Signed-off-by: Andrew Leech <[email protected]>
1 parent 71e8b27 commit b603fa3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

py/mkrules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ if(MICROPY_FROZEN_MANIFEST)
211211
endif()
212212
add_custom_command(
213213
OUTPUT ${MICROPY_MPYCROSS_DEPENDENCY}
214-
COMMAND ${MICROPY_MAKE_EXECUTABLE} -C ${MICROPY_DIR}/mpy-cross
214+
COMMAND ${MICROPY_MAKE_EXECUTABLE} -C ${MICROPY_DIR}/mpy-cross USER_C_MODULES=
215215
)
216216
endif()
217217

py/mkrules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ $(HEADER_BUILD):
176176
ifneq ($(MICROPY_MPYCROSS_DEPENDENCY),)
177177
# to automatically build mpy-cross, if needed
178178
$(MICROPY_MPYCROSS_DEPENDENCY):
179-
$(MAKE) -C "$(abspath $(dir $@)..)"
179+
$(MAKE) -C "$(abspath $(dir $@)..)" USER_C_MODULES=
180180
endif
181181

182182
ifneq ($(FROZEN_DIR),)

0 commit comments

Comments
 (0)