mkrules: Fix warning preprocessing C++ files

Messages like 'command-line option is [not valid] for C++' can result
from the way the preprocessor is invoked by `genlast`.  Instead, cause
the files to be preprocessed as though their content is "C".  This
should generally be OK, as they'll eventually be _compiled_ as C++.
When preprocessed as C, the file simply needs to generate all the same
QSTRS and TRANSLATEs.
This commit is contained in:
Jeff Epler 2021-08-29 11:26:37 -05:00
parent d7193dcf7c
commit 266b6a1dd9

View File

@ -65,7 +65,7 @@ vpath %.cpp . $(TOP) $(USER_C_MODULES)
$(BUILD)/%.o: %.cpp
$(call compile_cxx)
QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR
QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR -x c
# frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule
# for those as well.