From 2a9ea69fa93b1b940b802f981f8835f6decdb085 Mon Sep 17 00:00:00 2001 From: stijn Date: Thu, 10 Sep 2020 12:11:58 +0200 Subject: [PATCH] windows/msvc: Support freezing modules. Support freezing modules via manifest.py for consistency with the other ports. In essence this comes down to calling makemanifest.py and adding the resulting .c file to the build. Note the file with preprocessed qstrs has been renamed to match what makemanifest.py expects and which is also the name all other ports use. --- ports/windows/micropython.vcxproj | 2 +- ports/windows/msvc/genhdr.targets | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ports/windows/micropython.vcxproj b/ports/windows/micropython.vcxproj index f70fe96158..73a837a840 100644 --- a/ports/windows/micropython.vcxproj +++ b/ports/windows/micropython.vcxproj @@ -104,7 +104,7 @@ - + diff --git a/ports/windows/msvc/genhdr.targets b/ports/windows/msvc/genhdr.targets index 327f922e4a..3af0ea2636 100644 --- a/ports/windows/msvc/genhdr.targets +++ b/ports/windows/msvc/genhdr.targets @@ -55,7 +55,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { - + $([System.String]::new('%(FullPath)').Replace('$(PyBaseDir)', '$(DestDir)qstr\')) @@ -101,8 +101,8 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { $(QstrGen).tmp - - + + @@ -115,6 +115,17 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { + + + + + MICROPY_MODULE_FROZEN_MPY=1;MICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool;%(PreprocessorDefinitions) + + + + + +