build: fix MSVC 2022 Release compilation

PR-URL: https://github.com/nodejs/node/pull/46228
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
Vladimir Morozov (REDMOND) 2023-01-16 13:21:18 -08:00 committed by Michael Dawson
parent b6531696fa
commit 19bcba08be
4 changed files with 20 additions and 2 deletions

View File

@ -34,7 +34,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
windows: [windows-2019]
windows: [windows-2019, windows-2022]
fail-fast: false
runs-on: ${{ matrix.windows }}
steps:

View File

@ -37,7 +37,7 @@ permissions:
jobs:
coverage-windows:
if: github.event.pull_request.draft == false
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ItemDefinitionGroup>
<MARMASM>
<!-- Works around a situation when we preprocess file in $(IntDir). In such case the output file is the same as input file
and we get access violation. Appending '.pp' file extension to the output file name resolves this issue. -->
<PreprocessedFileName Condition="'%(PreprocessedFileName)' == ''">$(IntDir)%(FileName)%(Extension).pp</PreprocessedFileName>
</MARMASM>
</ItemDefinitionGroup>
</Project>

View File

@ -1433,6 +1433,14 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
['OS=="win"', {
'msvs_precompiled_header': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.h',
'msvs_precompiled_source': '<(V8_ROOT)/../../tools/msvs/pch/v8_pch.cc',
'sources': [
'<(_msvs_precompiled_header)',
'<(_msvs_precompiled_source)',
],
}],
],
}, # mksnapshot
{