From 6abf03b5d0b73e17260256580fa6f4881de18deb Mon Sep 17 00:00:00 2001 From: stijn Date: Tue, 24 Jan 2023 11:48:20 +0100 Subject: [PATCH] windows/msvc: Fix module freezing. Make this more generally useful and in line with what the mingw and unix ports do: 16bit dig size to work on 32bit ports, a self-contained qstrdefs.preprocessed.h because makemanifest.py uses that, and a dev variant which effectively puts this to use: previously the uasyncio module wasn't frozen but instead tests ran by importing it from the extmod/ directory. --- ports/windows/.appveyor.yml | 2 +- ports/windows/msvc/genhdr.targets | 6 ++++-- ports/windows/variants/dev/mpconfigvariant.props | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/windows/.appveyor.yml b/ports/windows/.appveyor.yml index 41b554b2d..c1a114a0f 100644 --- a/ports/windows/.appveyor.yml +++ b/ports/windows/.appveyor.yml @@ -34,7 +34,7 @@ before_build: - + "@ | Set-Content build.proj diff --git a/ports/windows/msvc/genhdr.targets b/ports/windows/msvc/genhdr.targets index 7d60e08a0..7bd8364a9 100644 --- a/ports/windows/msvc/genhdr.targets +++ b/ports/windows/msvc/genhdr.targets @@ -150,7 +150,9 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { $(QstrGen).tmp - + + + @@ -167,7 +169,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { - MICROPY_MODULE_FROZEN_MPY=1;MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool;%(PreprocessorDefinitions) + MICROPY_MODULE_FROZEN_MPY=1;MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool;MPZ_DIG_SIZE=16;%(PreprocessorDefinitions) diff --git a/ports/windows/variants/dev/mpconfigvariant.props b/ports/windows/variants/dev/mpconfigvariant.props index 14ce01a81..be1f1ae51 100644 --- a/ports/windows/variants/dev/mpconfigvariant.props +++ b/ports/windows/variants/dev/mpconfigvariant.props @@ -1,5 +1,8 @@ + + $(PyVariantDir)manifest.py + %(PreprocessorDefinitions);MICROPY_ROM_TEXT_COMPRESSION=1