mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
7f8aae31f9
Summary: We are seeing random segment fault originating from OpenSSL on macOS when Mononoke fetching is enabled. The cause is that on macOS we are actually linking against libcurl shipped with the system instead of ours. That copy of libcurl is linked with macOS's libcrypto instead of the one we compiles during Eden's build, and it seems that version of libcrypto does not provide concurrency safety. The solution is to build curl on macOS and make sure it is linked to our OpenSSL that has the concurrency callbacks registered. Reviewed By: wez Differential Revision: D17657822 fbshipit-source-id: 85abdf3be10b3903a5efc6b3a91624c7258de790
47 lines
943 B
CMake
47 lines
943 B
CMake
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2.
|
|
|
|
# FIXME: need to pull in proxygen for this
|
|
file(GLOB STORE_MONONOKE_SRCS "*.cpp")
|
|
|
|
if (NOT EDEN_HAVE_MONONOKE)
|
|
list(
|
|
REMOVE_ITEM
|
|
STORE_MONONOKE_SRCS
|
|
${CMAKE_CURRENT_SOURCE_DIR}/MononokeHttpBackingStore.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/MononokeThriftBackingStore.cpp
|
|
)
|
|
endif()
|
|
|
|
if (NOT EDEN_HAVE_CURL)
|
|
list(
|
|
REMOVE_ITEM
|
|
STORE_MONONOKE_SRCS
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CurlHttpClient.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/MononokeCurlBackingStore.cpp
|
|
)
|
|
endif()
|
|
|
|
add_library(
|
|
eden_store_mononoke STATIC
|
|
${STORE_MONONOKE_SRCS}
|
|
)
|
|
|
|
target_link_libraries(
|
|
eden_store_mononoke
|
|
PUBLIC
|
|
eden_model
|
|
eden_store
|
|
eden_utils
|
|
)
|
|
|
|
if (CURL_FOUND)
|
|
target_link_libraries(
|
|
eden_store_mononoke
|
|
PUBLIC
|
|
CURL::libcurl
|
|
)
|
|
endif()
|