diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2022-10-20 13:14:25 +1100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-10-25 14:57:04 +1100 |
| commit | 1ba0e8ff96334af986d2b7d90f6d86af27595d28 (patch) | |
| tree | 8ea411ccde26b4e45719cb5b6d8f4276b063eafa /tools/mpy-tool.py | |
| parent | 5ee1cb27711d3747747db3ecd7b761c2a064addf (diff) | |
py/persistentcode: Only emit sub-version if generated code has native.
In order for v1.19.1 to load a .mpy, the formerly-feature-flags which are
now used for the sub-version must be zero.
The sub-version is only used to indicate a native version change, so it
should be zero when emitting bytecode-only .mpy files.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'tools/mpy-tool.py')
| -rwxr-xr-x | tools/mpy-tool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mpy-tool.py b/tools/mpy-tool.py index 8b644c137..0b8a0403c 100755 --- a/tools/mpy-tool.py +++ b/tools/mpy-tool.py @@ -1676,7 +1676,7 @@ def merge_mpy(compiled_modules, output_file): header = bytearray(4) header[0] = ord("M") header[1] = config.MPY_VERSION - header[2] = config.native_arch << 2 | config.MPY_SUB_VERSION + header[2] = config.native_arch << 2 | config.MPY_SUB_VERSION if config.native_arch else 0 header[3] = config.mp_small_int_bits merged_mpy.extend(header) |
