From b4ea3897753d8e017050781cfe53d6e3ce54ebf0 Mon Sep 17 00:00:00 2001 From: "Vladimir Morozov (REDMOND)" Date: Mon, 16 Jan 2023 13:21:18 -0800 Subject: [PATCH] build: fix MSVC 2022 Release compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/46228 Reviewed-By: Michaƫl Zasso Reviewed-By: Michael Dawson --- .github/workflows/build-windows.yml | 2 +- .github/workflows/coverage-windows.yml | 2 +- tools/v8_gypfiles/directory.build.props | 10 ++++++++++ tools/v8_gypfiles/v8.gyp | 8 ++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 tools/v8_gypfiles/directory.build.props diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index e00e6457782407..64eb7ddad23988 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -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: diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 5c127eb482d2f7..3dd8d01565c8cb 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -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: diff --git a/tools/v8_gypfiles/directory.build.props b/tools/v8_gypfiles/directory.build.props new file mode 100644 index 00000000000000..f0fdb0f39454fa --- /dev/null +++ b/tools/v8_gypfiles/directory.build.props @@ -0,0 +1,10 @@ + + + + + + $(IntDir)%(FileName)%(Extension).pp + + + diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 42d74b619bb47a..c29d66976ffb1f 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -1437,6 +1437,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 {