Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed May 26, 2024
1 parent c926483 commit c37a1cd
Show file tree
Hide file tree
Showing 13 changed files with 1,655 additions and 2,125 deletions.
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
- [mdbx-go](#mdbx-go)
- [Min Requirements](#min-requirements)
- [Packages](#packages)
- [mdbx ](#mdbx--)
- [exp/mdbxpool ](#expmdbxpool--)
- [Key Features](#key-features)
- [Idiomatic API](#idiomatic-api)
- [High-Performance notices](#high-performance-notices)
- [Advantages of BoltDB](#advantages-of-boltdb)
- [Advantages of LMDB over BoltDB](#advantages-of-lmdb-over-boltdb)
- [Advantages of MDBX over LMDB](#advantages-of-mdbx-over-lmdb)
- [Build](#build)
- [Update C code](#update-c-code)
- [Build binaries](#build-binaries)
- [Documentation](#documentation)
- [Versioning and Stability](#versioning-and-stability)

# mdbx-go

Go bindings to the libmdbx: https://libmdbx.dqdkfa.ru
Go bindings to the libmdbx: <https://libmdbx.dqdkfa.ru>

**Notice**: page `./mdbx` contains only `mdbx.h` and `mdbx.c` - to minimize go build time/size.
But full version of libmdbx (produced by it's `make dist` command) is in `./../mdbxdist/`.
Expand Down Expand Up @@ -59,9 +76,9 @@ caveats that application developers must be aware of when relying on MDBX to sto
to fully read the [documentation](https://libmdbx.dqdkfa.ru) so they are aware of these caveats. And even
better if read through [mdbx.h](https://gitflic.ru/project/erthink/libmdbx/blob?file=mdbx.h)

### High Performance notices
### High-Performance notices

Applications with high performance requirements can opt-in to fast, zero-copy reads at the cost of runtime safety.
Applications with high-performance requirements can opt-in to fast, zero-copy reads at the cost of runtime safety.
Zero-copy behavior is specified at the transaction level to reduce instrumentation overhead.

```
Expand Down Expand Up @@ -126,17 +143,17 @@ On FreeBSD 10, you must explicitly set `CC` (otherwise it will fail with a crypt

CC=clang go test -v ./...

## Maintainance, update .c code
## Update C code

In MDBX repo: `make dist && cp -R ./dist/* ./../mdbx-go/mdbxdist/`. Then in mdbx-go repo: `make cp`
In `libmdbx` repo: `make dist && cp -R ./dist/* ./../mdbx-go/mdbxdist/`. Then in mdbx-go repo: `make cp`

## Build binaries

In mdbx-go repo: `MDBX_BUILD_TIMESTAMP=unknown make tools`

Or if use mdbx-go as a library:

```
```sh
go mod vendor && cd vendor/github.com/torquem-ch/mdbx-go && make tools
rm -rf vendor
```
Expand All @@ -156,7 +173,7 @@ stable and adhere to the guidelines of [semantic versioning](http://semver.org/)

Experimental packages (those packages in `exp/`) are not required to adhere to semantic versioning. However packages
specifically declared to merely be
"unstable" can be relied on more for long term use with less concern.
"unstable" can be relied on more for long-term use with less concern.

The API of an unstable package may change in subtle ways between minor release versions. But deprecations will be
indicated at least one release in advance and all functionality will remain available through some method.
248 changes: 208 additions & 40 deletions mdbxdist/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
##
## Copyright 2020-2024 Leonid Yuriev <[email protected]>
## and other libmdbx authors: please see AUTHORS file.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
##
## Copyright (c) 2020-2024 Леонид Юрьев aka Leonid Yuriev <[email protected]>
## SPDX-License-Identifier: Apache-2.0

##
## libmdbx = { Revised and extended descendant of Symas LMDB. }
Expand Down Expand Up @@ -69,36 +58,137 @@ else()
endif()

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/README.md" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.h++" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/core.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/alloy.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/api-cursor.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/api-env.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/api-extra.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/api-key-transform.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/api-txn.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/atomics-ops.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/atomics-types.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/audit.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/chk.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/cogs.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/cogs.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/coherency.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/cold.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/copy.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/cursor.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/cursor.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/dbi.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/dbi.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/debug_begin.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/debug_end.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/dpl.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/dpl.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/dxb.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/env-opts.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/env.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/essentials.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/gc-get.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/gc-put.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/gc.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/global.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/internals.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/layout-dxb.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/layout-lck.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/lck-posix.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/lck-windows.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/lck.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/lck.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/logging_and_debug.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/logging_and_debug.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_chk.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_copy.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_drop.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_dump.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_load.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1/mdbx_stat.1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/mdbx.c++" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/meta.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/meta.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/misc.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/mvcc-readers.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/node.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/node.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/ntdll.def" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/options.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/osal.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/osal.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-get.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-iov.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-iov.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-ops.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-ops.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/page-search.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/pnl.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/pnl.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/preface.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/proto.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/range-estimate.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/refund.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/sort.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/spill.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/subdb.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tls.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tls.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/chk.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/copy.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/drop.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/dump.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/load.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/stat.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/wingetopt.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tools/wingetopt.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/tree.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txl.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/txn.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/unaligned.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/utils.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/version.c.in" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/man1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/mdbx_chk.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/mdbx.c++")
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/walk.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/walk.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/windows-import.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/windows-import.h")
set(MDBX_AMALGAMATED_SOURCE FALSE)
find_program(GIT git)
if(NOT GIT)
message(SEND_ERROR "Git command-line tool not found")
endif()
set(MDBX_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION.txt" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.c++" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/man1" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_chk.c")
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.h" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx.h++" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_chk.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_copy.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_dump.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_load.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_stat.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mdbx_drop.c" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ntdll.def" AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in")
set(MDBX_AMALGAMATED_SOURCE TRUE)
set(MDBX_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
else()
message(FATAL_ERROR "\n"
"Please don't use tarballs nor zips which are automatically provided by Github! "
"These archives do not contain version information and thus are unfit to build libmdbx. "
"You can vote for ability of disabling auto-creation such unsuitable archives at https://github.community/t/disable-tarball\n"
"Instead of above, just clone the git repository, either download a tarball or zip with the properly amalgamated source core. "
"For embedding libmdbx use a git-submodule or the amalgamated source code.\n"
"Please, avoid using any other techniques.")
"The set of libmdbx source code files is incomplete! "
"Instead just follow the https://libmdbx.dqdkfa.ru/usage.html "
"PLEASE, AVOID USING ANY OTHER TECHNIQUES.")
endif()

if(DEFINED PROJECT_NAME)
Expand Down Expand Up @@ -600,13 +690,88 @@ else()
include_directories("${MDBX_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}")
else()
list(APPEND LIBMDBX_SOURCES
"${MDBX_SOURCE_DIR}/api-cursor.c"
"${MDBX_SOURCE_DIR}/api-env.c"
"${MDBX_SOURCE_DIR}/api-extra.c"
"${MDBX_SOURCE_DIR}/api-key-transform.c"
"${MDBX_SOURCE_DIR}/api-txn.c"
"${MDBX_SOURCE_DIR}/atomics-ops.h"
"${MDBX_SOURCE_DIR}/atomics-types.h"
"${MDBX_SOURCE_DIR}/audit.c"
"${MDBX_SOURCE_DIR}/chk.c"
"${MDBX_SOURCE_DIR}/cogs.c"
"${MDBX_SOURCE_DIR}/cogs.h"
"${MDBX_SOURCE_DIR}/coherency.c"
"${MDBX_SOURCE_DIR}/cold.c"
"${MDBX_SOURCE_DIR}/copy.c"
"${MDBX_SOURCE_DIR}/cursor.c"
"${MDBX_SOURCE_DIR}/cursor.h"
"${MDBX_SOURCE_DIR}/dbi.c"
"${MDBX_SOURCE_DIR}/dbi.h"
"${MDBX_SOURCE_DIR}/dpl.c"
"${MDBX_SOURCE_DIR}/dpl.h"
"${MDBX_SOURCE_DIR}/dxb.c"
"${MDBX_SOURCE_DIR}/env-opts.c"
"${MDBX_SOURCE_DIR}/env.c"
"${MDBX_SOURCE_DIR}/essentials.h"
"${MDBX_SOURCE_DIR}/gc-get.c"
"${MDBX_SOURCE_DIR}/gc-put.c"
"${MDBX_SOURCE_DIR}/gc.h"
"${MDBX_SOURCE_DIR}/global.c"
"${MDBX_SOURCE_DIR}/internals.h"
"${MDBX_SOURCE_DIR}/layout-dxb.h"
"${MDBX_SOURCE_DIR}/layout-lck.h"
"${MDBX_SOURCE_DIR}/lck.c"
"${MDBX_SOURCE_DIR}/lck.h"
"${MDBX_SOURCE_DIR}/logging_and_debug.c"
"${MDBX_SOURCE_DIR}/logging_and_debug.h"
"${MDBX_SOURCE_DIR}/meta.c"
"${MDBX_SOURCE_DIR}/meta.h"
"${MDBX_SOURCE_DIR}/misc.c"
"${MDBX_SOURCE_DIR}/mvcc-readers.c"
"${MDBX_SOURCE_DIR}/node.c"
"${MDBX_SOURCE_DIR}/node.h"
"${MDBX_SOURCE_DIR}/options.h"
"${MDBX_SOURCE_DIR}/osal.c"
"${MDBX_SOURCE_DIR}/osal.h"
"${MDBX_SOURCE_DIR}/page-get.c"
"${MDBX_SOURCE_DIR}/page-iov.c"
"${MDBX_SOURCE_DIR}/page-iov.h"
"${MDBX_SOURCE_DIR}/page-ops.c"
"${MDBX_SOURCE_DIR}/page-ops.h"
"${MDBX_SOURCE_DIR}/page-search.c"
"${MDBX_SOURCE_DIR}/pnl.c"
"${MDBX_SOURCE_DIR}/pnl.h"
"${MDBX_SOURCE_DIR}/preface.h"
"${MDBX_SOURCE_DIR}/proto.h"
"${MDBX_SOURCE_DIR}/range-estimate.c"
"${MDBX_SOURCE_DIR}/refund.c"
"${MDBX_SOURCE_DIR}/sort.h"
"${MDBX_SOURCE_DIR}/spill.c"
"${MDBX_SOURCE_DIR}/spill.h"
"${MDBX_SOURCE_DIR}/subdb.c"
"${MDBX_SOURCE_DIR}/tls.c"
"${MDBX_SOURCE_DIR}/tls.h"
"${MDBX_SOURCE_DIR}/tree.c"
"${MDBX_SOURCE_DIR}/txl.c"
"${MDBX_SOURCE_DIR}/txl.h"
"${MDBX_SOURCE_DIR}/txn.c"
"${MDBX_SOURCE_DIR}/unaligned.h"
"${MDBX_SOURCE_DIR}/utils.c"
"${MDBX_SOURCE_DIR}/utils.h"
"${MDBX_SOURCE_DIR}/walk.c"
"${MDBX_SOURCE_DIR}/walk.h"
"${CMAKE_CURRENT_BINARY_DIR}/version.c"
"${MDBX_SOURCE_DIR}/options.h" "${MDBX_SOURCE_DIR}/base.h"
"${MDBX_SOURCE_DIR}/internals.h" "${MDBX_SOURCE_DIR}/osal.h"
"${MDBX_SOURCE_DIR}/core.c" "${MDBX_SOURCE_DIR}/osal.c"
"${MDBX_SOURCE_DIR}/lck-posix.c")
)
if(NOT MSVC)
list(APPEND LIBMDBX_SOURCES "${MDBX_SOURCE_DIR}/lck-posix.c")
endif()
if(NOT APPLE)
list(APPEND LIBMDBX_SOURCES "${MDBX_SOURCE_DIR}/lck-windows.c")
list(APPEND LIBMDBX_SOURCES
"${MDBX_SOURCE_DIR}/windows-import.h"
"${MDBX_SOURCE_DIR}/windows-import.c"
"${MDBX_SOURCE_DIR}/lck-windows.c"
)
endif()
include_directories("${MDBX_SOURCE_DIR}")
endif()
Expand Down Expand Up @@ -747,20 +912,23 @@ endif()

# build mdbx-tools
if(MDBX_BUILD_TOOLS)
if(NOT MDBX_AMALGAMATED_SOURCE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(WINGETOPT_SRC ${MDBX_SOURCE_DIR}/wingetopt.c ${MDBX_SOURCE_DIR}/wingetopt.h)
else()
set(WINGETOPT_SRC "")
set(WINGETOPT_SRC "")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
set(WINGETOPT_SRC ${MDBX_SOURCE_DIR}/tools/wingetopt.c ${MDBX_SOURCE_DIR}/tools/wingetopt.h)
endif()

foreach(TOOL mdbx_chk mdbx_copy mdbx_stat mdbx_dump mdbx_load mdbx_drop)
add_executable(${TOOL} mdbx.h ${MDBX_SOURCE_DIR}/${TOOL}.c ${WINGETOPT_SRC})
foreach(TOOL chk copy stat dump load drop)
if(MDBX_AMALGAMATED_SOURCE)
add_executable(mdbx_${TOOL} mdbx.h ${MDBX_SOURCE_DIR}/mdbx_${TOOL}.c)
else()
add_executable(mdbx_${TOOL} mdbx.h ${MDBX_SOURCE_DIR}/tools/${TOOL}.c ${WINGETOPT_SRC})
endif()
if(NOT C_FALLBACK_GNU11 AND NOT C_FALLBACK_11)
set_target_properties(${TOOL} PROPERTIES
set_target_properties(mdbx_${TOOL} PROPERTIES
C_STANDARD ${MDBX_C_STANDARD} C_STANDARD_REQUIRED ON)
endif()
target_setup_options(${TOOL})
target_link_libraries(${TOOL} ${TOOL_MDBX_LIB})
target_setup_options(mdbx_${TOOL})
target_link_libraries(mdbx_${TOOL} ${TOOL_MDBX_LIB})
endforeach()
if(LIB_MATH)
target_link_libraries(mdbx_chk ${LIB_MATH})
Expand Down
2 changes: 1 addition & 1 deletion mdbxdist/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ and [by Yandex](https://translated.turbopages.org/proxy_u/ru-en.en/https/gitflic
интеграции с легковесными потоками/нитями их мультиплексирования вместе
с транзакциями по потокам операционной системы.

- TODO: Опция `MDBX_opt_prefer_waf_insteadof_balance`.
- Опция `MDBX_opt_prefer_waf_insteadof_balance`.

- TODO: Опции `MDBX_opt_subpage_limit`, `MDBX_opt_subpage_room_threshold`, `MDBX_opt_subpage_reserve_prereq`, `MDBX_opt_subpage_reserve_limit`.

Expand Down
Loading

0 comments on commit c37a1cd

Please sign in to comment.