diff options
author | Damien George <damien@micropython.org> | 2021-06-24 09:43:54 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-06-25 10:50:54 +1000 |
commit | 08e0e065f4fa26cb1f52567ad53052310bc656e6 (patch) | |
tree | ae00fb2c2d902589bc1bc769583f9f2b04f168d4 /py/makeqstrdefs.py | |
parent | 115acadf9211fddc8b5857af287daa622dc615c1 (diff) | |
download | micropython-08e0e065f4fa26cb1f52567ad53052310bc656e6.tar.gz micropython-08e0e065f4fa26cb1f52567ad53052310bc656e6.zip |
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/makeqstrdefs.py')
-rw-r--r-- | py/makeqstrdefs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py index ad4f22d5e4..187a9aeeaa 100644 --- a/py/makeqstrdefs.py +++ b/py/makeqstrdefs.py @@ -34,7 +34,7 @@ def preprocess(): for source in sources: if source.endswith(".cpp"): cxxsources.append(source) - else: + elif source.endswith(".c"): csources.append(source) try: os.makedirs(os.path.dirname(args.output[0])) |