aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-22 22:05:05 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-23 07:53:18 +0200
commit7005d7afa140bb007ba2827851da2d0616050415 (patch)
tree94a0ea7248166ed6b0e7808f3f6815c39581ac35 /tools
parenteff25f9f5c1ef7c0a9e8a0c8d4cc42813694a22a (diff)
fix windows protoc artifact build
Diffstat (limited to 'tools')
-rw-r--r--tools/run_tests/artifacts/build_artifact_protoc.bat21
1 files changed, 15 insertions, 6 deletions
diff --git a/tools/run_tests/artifacts/build_artifact_protoc.bat b/tools/run_tests/artifacts/build_artifact_protoc.bat
index f38a65ff1a..2e9aae8148 100644
--- a/tools/run_tests/artifacts/build_artifact_protoc.bat
+++ b/tools/run_tests/artifacts/build_artifact_protoc.bat
@@ -14,13 +14,22 @@
mkdir -p %ARTIFACTS_OUT%
-setlocal
-cd third_party/protobuf/cmake
+@rem enter repo root
+cd /d %~dp0\..\..\..
-mkdir build & cd build
-mkdir solution & cd solution
-cmake -G "%generator%" -Dprotobuf_BUILD_TESTS=OFF ../.. || goto :error
-endlocal
+mkdir cmake
+cd cmake
+mkdir build
+cd build
+
+@rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly
+@rem If yasm is not on the path, use hardcoded path instead.
+yasm --version || set USE_HARDCODED_YASM_PATH_MAYBE=-DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe"
+
+cmake -G "%generator%" -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../.. || goto :error
+cmake --build . --target protoc --config Release || goto :error
+cmake --build . --target plugins --config Release || goto :error
+cd ..\..
xcopy /Y cmake\build\third_party\protobuf\Release\protoc.exe %ARTIFACTS_OUT%\ || goto :error
xcopy /Y cmake\build\Release\*_plugin.exe %ARTIFACTS_OUT%\ || goto :error