diff options
| author | stijn | 2020-10-08 16:52:25 +0200 |
|---|---|---|
| committer | Damien George | 2020-10-29 15:29:50 +1100 |
| commit | fad4079778f46bc21dd19a674b31b4c3c7eb6a91 (patch) | |
| tree | 1a25658b8ad160b4e783806a1bbe3cd86cc65115 /ports/unix/main.c | |
| parent | 0153148fd26308e4ce921a4287ac4a26af15a9fe (diff) | |
esp32,unix: Support building C++ code.
Support building .cpp files and linking them into the micropython
executable in a way similar to how it is done for .c files. The main
incentive here is to enable user C modules to use C++ files (which are put
in SRC_MOD_CXX by py.mk) since the core itself does not utilize C++.
However, to verify build functionality a unix overage test is added. The
esp32 port already has CXXFLAGS so just add the user modules' flags to it.
For the unix port use a copy of the CFLAGS but strip the ones which are not
usable for C++.
Diffstat (limited to 'ports/unix/main.c')
| -rw-r--r-- | ports/unix/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ports/unix/main.c b/ports/unix/main.c index 0fe492a55..6f85cbf8d 100644 --- a/ports/unix/main.c +++ b/ports/unix/main.c @@ -531,7 +531,9 @@ MP_NOINLINE int main_(int argc, char **argv) { #if defined(MICROPY_UNIX_COVERAGE) { MP_DECLARE_CONST_FUN_OBJ_0(extra_coverage_obj); + MP_DECLARE_CONST_FUN_OBJ_0(extra_cpp_coverage_obj); mp_store_global(QSTR_FROM_STR_STATIC("extra_coverage"), MP_OBJ_FROM_PTR(&extra_coverage_obj)); + mp_store_global(QSTR_FROM_STR_STATIC("extra_cpp_coverage"), MP_OBJ_FROM_PTR(&extra_cpp_coverage_obj)); } #endif |
