Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d20b9bf6
Commit
d20b9bf6
authored
Nov 28, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tokutek/mariadb#12 rebase to mariadb-5.5.34
parent
439465dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
34 deletions
+32
-34
cmake_modules/TokuThirdParty.cmake
cmake_modules/TokuThirdParty.cmake
+30
-31
portability/CMakeLists.txt
portability/CMakeLists.txt
+2
-2
portability/os_malloc.cc
portability/os_malloc.cc
+0
-1
No files found.
cmake_modules/TokuThirdParty.cmake
View file @
d20b9bf6
include
(
ExternalProject
)
## add jemalloc with an external project
set
(
JEMALLOC_SOURCE_DIR
"
${
TokuDB_SOURCE_DIR
}
/third_party/jemalloc"
CACHE FILEPATH
"Where to find jemalloc sources."
)
if
(
NOT EXISTS
"
${
JEMALLOC_SOURCE_DIR
}
/configure"
)
message
(
FATAL_ERROR
"Can't find jemalloc sources. Please check them out to
${
JEMALLOC_SOURCE_DIR
}
or modify JEMALLOC_SOURCE_DIR."
)
endif
()
set
(
jemalloc_configure_opts
"CC=
${
CMAKE_C_COMPILER
}
"
"--with-jemalloc-prefix="
"--with-private-namespace=tokudb_jemalloc_internal_"
"--enable-cc-silence"
)
option
(
JEMALLOC_DEBUG
"Build jemalloc with --enable-debug."
OFF
)
if
(
JEMALLOC_DEBUG
)
list
(
APPEND jemalloc_configure_opts --enable-debug
)
endif
()
ExternalProject_Add
(
build_jemalloc
PREFIX jemalloc
SOURCE_DIR
"
${
JEMALLOC_SOURCE_DIR
}
"
CONFIGURE_COMMAND
"
${
JEMALLOC_SOURCE_DIR
}
/configure"
${
jemalloc_configure_opts
}
"--prefix=
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc"
)
if
(
NOT DEFINED LIBJEMALLOC
)
## add jemalloc with an external project
set
(
JEMALLOC_SOURCE_DIR
"
${
TokuDB_SOURCE_DIR
}
/third_party/jemalloc"
CACHE FILEPATH
"Where to find jemalloc sources."
)
if
(
NOT EXISTS
"
${
JEMALLOC_SOURCE_DIR
}
/configure"
)
message
(
FATAL_ERROR
"Can't find jemalloc sources. Please check them out to
${
JEMALLOC_SOURCE_DIR
}
or modify JEMALLOC_SOURCE_DIR."
)
endif
()
set
(
jemalloc_configure_opts
"CC=
${
CMAKE_C_COMPILER
}
"
"--with-jemalloc-prefix="
"--with-private-namespace=tokudb_jemalloc_internal_"
"--enable-cc-silence"
)
option
(
JEMALLOC_DEBUG
"Build jemalloc with --enable-debug."
OFF
)
if
(
JEMALLOC_DEBUG
)
list
(
APPEND jemalloc_configure_opts --enable-debug
)
endif
()
ExternalProject_Add
(
build_jemalloc
PREFIX jemalloc
SOURCE_DIR
"
${
JEMALLOC_SOURCE_DIR
}
"
CONFIGURE_COMMAND
"
${
JEMALLOC_SOURCE_DIR
}
/configure"
${
jemalloc_configure_opts
}
"--prefix=
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc"
)
add_library
(
jemalloc STATIC IMPORTED GLOBAL
)
set_target_properties
(
jemalloc PROPERTIES IMPORTED_LOCATION
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib/libjemalloc_pic.a"
)
add_dependencies
(
jemalloc build_jemalloc
)
add_library
(
jemalloc_nopic STATIC IMPORTED GLOBAL
)
set_target_properties
(
jemalloc_nopic PROPERTIES IMPORTED_LOCATION
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib/libjemalloc.a"
)
add_dependencies
(
jemalloc_nopic build_jemalloc
)
add_library
(
jemalloc STATIC IMPORTED GLOBAL
)
set_target_properties
(
jemalloc PROPERTIES IMPORTED_LOCATION
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib/libjemalloc_pic.a"
)
add_dependencies
(
jemalloc build_jemalloc
)
add_library
(
jemalloc_nopic STATIC IMPORTED GLOBAL
)
set_target_properties
(
jemalloc_nopic PROPERTIES IMPORTED_LOCATION
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib/libjemalloc.a"
)
add_dependencies
(
jemalloc_nopic build_jemalloc
)
# detect when we are being built as a subproject
if
(
NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING
)
install
(
DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib"
DESTINATION .
)
# detect when we are being built as a subproject
if
(
NOT DEFINED MYSQL_PROJECT_NAME_DOCSTRING
)
install
(
DIRECTORY
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_CFG_INTDIR
}
/jemalloc/lib"
DESTINATION .
)
endif
()
endif
()
## add lzma with an external project
...
...
portability/CMakeLists.txt
View file @
d20b9bf6
...
...
@@ -15,13 +15,13 @@ set(tokuportability_srcs
)
add_library
(
${
LIBTOKUPORTABILITY
}
SHARED
${
tokuportability_srcs
}
)
target_link_libraries
(
${
LIBTOKUPORTABILITY
}
LINK_PRIVATE
jemalloc
)
target_link_libraries
(
${
LIBTOKUPORTABILITY
}
LINK_PRIVATE
${
LIBJEMALLOC
}
)
target_link_libraries
(
${
LIBTOKUPORTABILITY
}
LINK_PUBLIC
${
CMAKE_THREAD_LIBS_INIT
}
${
EXTRA_SYSTEM_LIBS
}
)
add_library
(
tokuportability_static_conv STATIC
${
tokuportability_srcs
}
)
set_target_properties
(
tokuportability_static_conv PROPERTIES POSITION_INDEPENDENT_CODE ON
)
add_dependencies
(
tokuportability_static_conv build_jemalloc
)
set
(
tokuportability_source_libs tokuportability_static_conv
jemalloc
${
CMAKE_THREAD_LIBS_INIT
}
${
EXTRA_SYSTEM_LIBS
}
)
set
(
tokuportability_source_libs tokuportability_static_conv
${
LIBJEMALLOC
}
${
CMAKE_THREAD_LIBS_INIT
}
${
EXTRA_SYSTEM_LIBS
}
)
toku_merge_static_libs
(
${
LIBTOKUPORTABILITY
}
_static
${
LIBTOKUPORTABILITY
}
_static
"
${
tokuportability_source_libs
}
"
)
maybe_add_gcov_to_libraries
(
${
LIBTOKUPORTABILITY
}
tokuportability_static_conv
)
...
...
portability/os_malloc.cc
View file @
d20b9bf6
...
...
@@ -93,7 +93,6 @@ PATENT RIGHTS GRANT:
#include <toku_portability.h>
#include <stdlib.h>
#include <jemalloc/include/jemalloc/jemalloc.h>
#if defined(HAVE_MALLOC_H)
# include <malloc.h>
#elif defined(HAVE_SYS_MALLOC_H)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment