diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2018-08-22 18:20:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-22 18:20:15 +0200 |
commit | f10596f0f3d6ab2dfe67b86d259a8d3effb73a99 (patch) | |
tree | e6abb60f86c650746ebee21ba001b48092377c37 | |
parent | 8f04899b21e53dbf5692c1ecc12b8c9e7309667e (diff) | |
parent | 1096fa81a41c58d40e88a29e4ca20613a4276e6b (diff) |
Merge pull request #16415 from jtattermusch/cmake_likes_assembly
cmake: disable assembly optimizations only when necessary
-rw-r--r-- | cmake/ssl.cmake | 9 | ||||
-rw-r--r-- | doc/ssl-performance.md | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake index 83f642a675..19a7d779b3 100644 --- a/cmake/ssl.cmake +++ b/cmake/ssl.cmake @@ -17,7 +17,14 @@ if("${gRPC_SSL_PROVIDER}" STREQUAL "module") set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) endif() if(EXISTS "${BORINGSSL_ROOT_DIR}/CMakeLists.txt") - set(OPENSSL_NO_ASM ON) # make boringssl buildable with Visual Studio + if (MSVC AND NOT CMAKE_GENERATOR STREQUAL "Ninja") + # Visual Studio build with assembly optimizations is broken, + # but it works with Ninja generator. + # This will get eventually fixed in cmake, but until then + # we need to disable assembly optimizations. + # See https://github.com/grpc/grpc/issues/16376 + set(OPENSSL_NO_ASM ON) + endif() add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl) if(TARGET ssl) set(_gRPC_SSL_LIBRARIES ssl) diff --git a/doc/ssl-performance.md b/doc/ssl-performance.md index 176c8d8f24..711b9dff09 100644 --- a/doc/ssl-performance.md +++ b/doc/ssl-performance.md @@ -14,7 +14,9 @@ Makefile | all other cases | all | :x: Bazel | | Linux | :heavy_check_mark: Bazel | | MacOS | :heavy_check_mark: Bazel | | Windows | :x: -CMake | boringssl from submodule (default) | all | :x: +CMake | boringssl from submodule (default) | Linux or MacOS | :heavy_check_mark: +CMake | boringssl from submodule (default), generator=Ninja | Windows | :heavy_check_mark: +CMake | boringssl from submodule (default), generator=Visual Studio | Windows | :x: CMake | pre-installed OpenSSL 1.0.2+ (`gRPC_SSL_PROVIDER=package`) | all | :heavy_check_mark: ## Other Languages: Binary/Source Packages |