From ae65bb8f7f86b7c3a50146cebeb6da239dbbd5fb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Dec 2021 10:56:14 +0100 Subject: [PATCH] windows: speedup build of C# extension and protoc artifacts (#28225) --- tools/run_tests/artifacts/build_artifact_csharp.bat | 2 +- tools/run_tests/artifacts/build_artifact_protoc.bat | 2 +- tools/run_tests/helper_scripts/pre_build_csharp.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/artifacts/build_artifact_csharp.bat b/tools/run_tests/artifacts/build_artifact_csharp.bat index 370d345ff68..7892561ae96 100644 --- a/tools/run_tests/artifacts/build_artifact_csharp.bat +++ b/tools/run_tests/artifacts/build_artifact_csharp.bat @@ -35,7 +35,7 @@ if "%ARCHITECTURE%" == "x64" ( ) call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %ARCHITECTURE% -cmake -G Ninja -DCMAKE_C_COMPILER="%MSVC_COMPILER%" -DCMAKE_CXX_COMPILER="%MSVC_COMPILER%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON ../../.. || goto :error +cmake -G Ninja -DCMAKE_C_COMPILER="%MSVC_COMPILER%" -DCMAKE_CXX_COMPILER="%MSVC_COMPILER%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON -DgRPC_BUILD_MSVC_MP_COUNT=4 ../../.. || goto :error cmake --build . --target grpc_csharp_ext cd ..\..\.. diff --git a/tools/run_tests/artifacts/build_artifact_protoc.bat b/tools/run_tests/artifacts/build_artifact_protoc.bat index 1d5bf034d5d..ea7d6bb6363 100644 --- a/tools/run_tests/artifacts/build_artifact_protoc.bat +++ b/tools/run_tests/artifacts/build_artifact_protoc.bat @@ -22,7 +22,7 @@ cd cmake mkdir build cd build -cmake -G "%generator%" -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON ../.. || goto :error +cmake -G "%generator%" -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_BUILD_MSVC_MP_COUNT=4 ../.. || goto :error cmake --build . --target protoc --config Release || goto :error cmake --build . --target plugins --config Release || goto :error cd ..\.. diff --git a/tools/run_tests/helper_scripts/pre_build_csharp.bat b/tools/run_tests/helper_scripts/pre_build_csharp.bat index c50552830c7..886fee5400c 100644 --- a/tools/run_tests/helper_scripts/pre_build_csharp.bat +++ b/tools/run_tests/helper_scripts/pre_build_csharp.bat @@ -28,7 +28,7 @@ cd build mkdir %ARCHITECTURE% cd %ARCHITECTURE% -cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON ../../.. || goto :error +cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON -DgRPC_XDS_USER_AGENT_IS_CSHARP=ON -DgRPC_BUILD_MSVC_MP_COUNT=4 ../../.. || goto :error cd ..\..\..\src\csharp