mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Fix ASAN build (#7629)
* Fix ASAN build Description -diff-2: Fix Mac build issues -diff-1: Address review comments Patch addresses the issue where ASAN build failed after introducing BlobGranule compression. Testing ASAN build
This commit is contained in:
parent
aa2740e21e
commit
9a3e88df46
@ -38,7 +38,10 @@ function(compile_boost)
|
||||
set(BOOST_LINK_FLAGS "")
|
||||
if(APPLE OR CLANG OR ICX OR USE_LIBCXX)
|
||||
list(APPEND BOOST_COMPILER_FLAGS -stdlib=libc++ -nostdlib++)
|
||||
list(APPEND BOOST_LINK_FLAGS -static-libgcc -lc++ -lc++abi)
|
||||
list(APPEND BOOST_LINK_FLAGS -lc++ -lc++abi)
|
||||
if (NOT APPLE)
|
||||
list(APPEND BOOST_LINK_FLAGS -static-libgcc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Update the user-config.jam
|
||||
@ -46,9 +49,9 @@ function(compile_boost)
|
||||
foreach(flag IN LISTS BOOST_COMPILER_FLAGS COMPILE_BOOST_CXXFLAGS)
|
||||
string(APPEND BOOST_ADDITIONAL_COMPILE_OPTIONS "<cxxflags>${flag} ")
|
||||
endforeach()
|
||||
#foreach(flag IN LISTS BOOST_LINK_FLAGS COMPILE_BOOST_LDFLAGS)
|
||||
# string(APPEND BOOST_ADDITIONAL_COMPILE_OPTIONS "<linkflags>${flag} ")
|
||||
#endforeach()
|
||||
foreach(flag IN LISTS BOOST_LINK_FLAGS COMPILE_BOOST_LDFLAGS)
|
||||
string(APPEND BOOST_ADDITIONAL_COMPILE_OPTIONS "<linkflags>${flag} ")
|
||||
endforeach()
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/user-config.jam.cmake ${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
set(USER_CONFIG_FLAG --user-config=${CMAKE_BINARY_DIR}/user-config.jam)
|
||||
|
||||
|
@ -71,13 +71,6 @@ if(WITH_AWS_BACKUP)
|
||||
include(awssdk)
|
||||
endif()
|
||||
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
add_compile_definitions(ZLIB_LIB_SUPPORTED)
|
||||
else()
|
||||
message(STATUS "ZLIB package not found")
|
||||
endif()
|
||||
|
||||
add_flow_target(STATIC_LIBRARY NAME fdbclient SRCS ${FDBCLIENT_SRCS} ADDL_SRCS ${options_srcs})
|
||||
target_include_directories(fdbclient PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/include/fdbclient/versions.h)
|
||||
|
@ -23,13 +23,6 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/workloads)
|
||||
|
||||
add_flow_target(EXECUTABLE NAME fdbserver SRCS ${FDBSERVER_SRCS})
|
||||
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
add_compile_definitions(ZLIB_LIB_SUPPORTED)
|
||||
else()
|
||||
message(STATUS "ZLIB package not found")
|
||||
endif()
|
||||
|
||||
target_include_directories(fdbserver PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/bindings/c
|
||||
${CMAKE_BINARY_DIR}/bindings/c
|
||||
|
@ -26,8 +26,8 @@ target_link_libraries(flowlinktest PRIVATE flow stacktrace)
|
||||
|
||||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
add_compile_definitions(ZLIB_LIB_SUPPORTED)
|
||||
target_link_libraries(flow PRIVATE ZLIB::ZLIB)
|
||||
target_compile_definitions(flow PUBLIC ZLIB_LIB_SUPPORTED)
|
||||
target_link_libraries(flow PUBLIC ZLIB::ZLIB)
|
||||
else()
|
||||
message(STATUS "ZLIB package not found")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user