Use 64bit linker on windows even when creating 32bit targets (#31237)

* Try CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE

* Target

* fix vcvarsall.bat argument

Co-authored-by: Jan Tattermusch <jtattermusch@google.com>
pull/31317/head
Esun Kim 2 years ago committed by GitHub
parent e3803bb1b5
commit 4b491e3274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      tools/run_tests/helper_scripts/build_cxx.bat
  2. 3
      tools/run_tests/run_tests.py

@ -45,7 +45,7 @@ If "%GRPC_CMAKE_GENERATOR%" == "Ninja" (
) else (
@rem Use one of the Visual Studio generators.
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" -DgRPC_BUILD_TESTS=ON -DgRPC_BUILD_MSVC_MP_COUNT=%GRPC_RUN_TESTS_JOBS% %* ../.. || goto :error
cmake -G "%GRPC_CMAKE_GENERATOR%" -A "%GRPC_CMAKE_ARCHITECTURE%" -DCMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE=x64 -DgRPC_BUILD_TESTS=ON -DgRPC_BUILD_MSVC_MP_COUNT=%GRPC_RUN_TESTS_JOBS% %* ../.. || goto :error
@rem GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX will be set to either "c" or "cxx"
cmake --build . --target buildtests_%GRPC_RUN_TESTS_CXX_LANGUAGE_SUFFIX% --config %MSBUILD_CONFIG% || goto :error

@ -278,7 +278,8 @@ class CLanguage(object):
self._cmake_architecture_windows = 'x64' if self.args.arch == 'x64' else 'Win32'
# when builing with Ninja, the VS common tools need to be activated first
self._activate_vs_tools_windows = activate_vs_tools
self._vs_tools_architecture_windows = 'x64' if self.args.arch == 'x64' else 'x86'
# "x64_x86" means create 32bit binaries, but use 64bit toolkit to secure more memory for the build
self._vs_tools_architecture_windows = 'x64' if self.args.arch == 'x64' else 'x64_x86'
else:
if self.platform == 'linux':

Loading…
Cancel
Save