aboutsummaryrefslogtreecommitdiff
path: root/py/py.mk
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-06-24 09:43:54 +1000
committerDamien George <damien@micropython.org>2021-06-25 10:50:54 +1000
commit08e0e065f4fa26cb1f52567ad53052310bc656e6 (patch)
treeae00fb2c2d902589bc1bc769583f9f2b04f168d4 /py/py.mk
parent115acadf9211fddc8b5857af287daa622dc615c1 (diff)
py/makeqstrdefs.py: Don't include .h files explicitly in preprocessing.
Only include .c and .cpp files explicitly in the list of files passed to the preprocessor for QSTR extraction. All relevant .h files will be included in this process by "#include" from the .c(pp) files. In particular for moduledefs.h, this is included by py/objmodule.c (and doesn't actually contain any extractable MP_QSTR_xxx, but rather defines macros with MP_QSTR_xxx's in them which are then part of py/objmodule.c). The main reason for this change is to simplify the preprocessing step on the javascript port, which tries to compile .h files as C++ precompiled headers if they are passed with -E to clang. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/py.mk')
-rw-r--r--py/py.mk2
1 files changed, 0 insertions, 2 deletions
diff --git a/py/py.mk b/py/py.mk
index 59abc8f50..ab01b0ec2 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -269,8 +269,6 @@ $(HEADER_BUILD)/moduledefs.h: $(SRC_QSTR) $(QSTR_GLOBAL_DEPENDENCIES) | $(HEADER
@$(ECHO) "GEN $@"
$(Q)$(PYTHON) $(PY_SRC)/makemoduledefs.py --vpath="., $(TOP), $(USER_C_MODULES)" $(SRC_QSTR) > $@
-SRC_QSTR += $(HEADER_BUILD)/moduledefs.h
-
# Standard C functions like memset need to be compiled with special flags so
# the compiler does not optimise these functions in terms of themselves.
CFLAGS_BUILTIN ?= -ffreestanding -fno-builtin -fno-lto