From cf258c898eab664615220683d0f9e0507383b925 Mon Sep 17 00:00:00 2001 From: stijn Date: Wed, 12 Jan 2022 13:57:41 +0100 Subject: [PATCH] windows/msvc: Run qstr preprocessing phase in parallel. Supported from VS2017 and up, this roughly halves build time. --- ports/windows/msvc/genhdr.targets | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/ports/windows/msvc/genhdr.targets b/ports/windows/msvc/genhdr.targets index 78e57a34ee..ed97a455d3 100644 --- a/ports/windows/msvc/genhdr.targets +++ b/ports/windows/msvc/genhdr.targets @@ -18,8 +18,14 @@ python cl.exe $([System.IO.Path]::Combine(`$(CLToolPath)`, `$(CLToolExe)`)) + 120 + $(PlatformToolset.Replace('v', '')) + True + + @@ -57,6 +63,7 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { + False $([System.String]::new('%(FullPath)').Replace('$(PyBaseDir)', '$(DestDir)qstr\')) @@ -71,13 +78,21 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { + $(PyClTool) /nologo /I@(PyIncDirs, ' /I') /D@(PreProcDefs, ' /D') @(QstrDependencies->AnyHaveMetadataValue('Changed', 'True')) @(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True')) + + + $(PyPreProcCommand) /Fi%(OutFile) /P %(Identity) + %(OutFile) + + + + + + - -