diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-08-21 18:01:53 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-08-21 18:01:53 +0200 |
commit | 7132cd7164198855347ae21332e104b8f4e15700 (patch) | |
tree | 45793cbaa69fc3e1b3b34bd11340a7f3f344d500 /cmake | |
parent | 6c45188c96ed1456f7b6b38d8c14fc016f02b81a (diff) |
cmake: disable assembly optimizations only when necessary
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ssl.cmake | 9 |
1 files changed, 8 insertions, 1 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) |