Skip to content

Commit 266b6a1

Browse files
committed
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.
1 parent d7193dc commit 266b6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/mkrules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ vpath %.cpp . $(TOP) $(USER_C_MODULES)
6565
$(BUILD)/%.o: %.cpp
6666
$(call compile_cxx)
6767

68-
QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR
68+
QSTR_GEN_EXTRA_CFLAGS += -DNO_QSTR -x c
6969

7070
# frozen.c and frozen_mpy.c are created in $(BUILD), so use our rule
7171
# for those as well.

0 commit comments

Comments
 (0)