Commit a0251c7d authored by Sergei Petrunia's avatar Sergei Petrunia

Post-merge build fixes

- Don't add DZSTD_STATIC_LINKING_ONLY
- Don't use upstream's way of linking with Jemalloc (MyRocks/MariaDB has
  its own in build_rocksdb.cmake)
- Don't depend on libunwind
parent 15087b41
...@@ -162,23 +162,25 @@ if (UNIX AND NOT APPLE) ...@@ -162,23 +162,25 @@ if (UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt) TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
endif() endif()
IF (WITH_JEMALLOC) # IF (WITH_JEMALLOC)
FIND_LIBRARY(JEMALLOC_LIBRARY # FIND_LIBRARY(JEMALLOC_LIBRARY
NAMES libjemalloc${PIC_EXT}.a jemalloc # NAMES libjemalloc${PIC_EXT}.a jemalloc
HINTS ${WITH_JEMALLOC}/lib) # HINTS ${WITH_JEMALLOC}/lib)
SET(rocksdb_static_libs ${rocksdb_static_libs} # SET(rocksdb_static_libs ${rocksdb_static_libs}
${JEMALLOC_LIBRARY}) # ${JEMALLOC_LIBRARY})
ADD_DEFINITIONS(-DROCKSDB_JEMALLOC) # ADD_DEFINITIONS(-DROCKSDB_JEMALLOC)
ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE) # ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
ENDIF() # ENDIF()
IF (WITH_UNWIND) # MariaDB: Q: why does the upstream add libunwind for a particular
FIND_LIBRARY(UNWIND_LIBRARY # storage engine?
NAMES libunwind${PIC_EXT}.a unwind #IF (WITH_UNWIND)
HINTS ${WITH_UNWIND}/lib) # FIND_LIBRARY(UNWIND_LIBRARY
SET(rocksdb_static_libs ${rocksdb_static_libs} # NAMES libunwind${PIC_EXT}.a unwind
${UNWIND_LIBRARY}) # HINTS ${WITH_UNWIND}/lib)
ENDIF() # SET(rocksdb_static_libs ${rocksdb_static_libs}
# ${UNWIND_LIBRARY})
#ENDIF()
TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib) TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib)
...@@ -209,7 +211,8 @@ ENDIF() ...@@ -209,7 +211,8 @@ ENDIF()
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
IF(HAVE_SCHED_GETCPU) IF(HAVE_SCHED_GETCPU)
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1) ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1)
ADD_DEFINITIONS(-DZSTD_STATIC_LINKING_ONLY) # MariaDB: don't do this:
# ADD_DEFINITIONS(-DZSTD_STATIC_LINKING_ONLY)
ENDIF() ENDIF()
IF (WITH_TBB) IF (WITH_TBB)
......
...@@ -21,11 +21,13 @@ else() ...@@ -21,11 +21,13 @@ else()
if(WITH_ROCKSDB_JEMALLOC) if(WITH_ROCKSDB_JEMALLOC)
find_package(JeMalloc REQUIRED) find_package(JeMalloc REQUIRED)
add_definitions(-DROCKSDB_JEMALLOC) add_definitions(-DROCKSDB_JEMALLOC)
ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
include_directories(${JEMALLOC_INCLUDE_DIR}) include_directories(${JEMALLOC_INCLUDE_DIR})
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# FreeBSD has jemaloc as default malloc # FreeBSD has jemaloc as default malloc
add_definitions(-DROCKSDB_JEMALLOC) add_definitions(-DROCKSDB_JEMALLOC)
ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
set(WITH_JEMALLOC ON) set(WITH_JEMALLOC ON)
endif() endif()
endif() endif()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment