Skip to content

Commit

Permalink
Squashed 'src/dashbls/' changes from 66ee820..22b066020c
Browse files Browse the repository at this point in the history
22b066020c build: match detection of Win32 libraries with mimalloc (dashpay#60)
03268b3a02 Merge pull request dashpay#59 from kittywhiskers/repair_subtree
3d2e7a183e depends: commit microsoft/mimalloc@91ba1f37 to source tree as 44314dd9
7a4d1a01fa depends: remove mangled 'depends/mimalloc' subdirectory
44314dd972 Squashed 'depends/mimalloc/' content from commit 91ba1f37
8383f08 dashbls: replace flaky minialloc with microsoft/mimalloc@91ba1f37, add as vendored dependency (dashpay#55)
85b7e61 fix: Should not check validity for legacy G1 and G2 in FromBytes (dashpay#58)
7457939 chore/fix: bump Catch2 to v2.13.10 (dashpay#57)

git-subtree-dir: src/dashbls
git-subtree-split: 22b066020c14bd162022c73f90fc7c940f4acdda
  • Loading branch information
kwvg committed Jan 2, 2023
1 parent 3bc4b00 commit 8bf0c81
Show file tree
Hide file tree
Showing 298 changed files with 62,359 additions and 1,284 deletions.
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,15 @@ set(QUIET "on" CACHE STRING "Relic - Build with printing disabled")
set(PP_EXT "LAZYR" CACHE STRING "")
set(PP_METHD "LAZYR;OATEP" CACHE STRING "")

# Disable mimalloc shared libraries and tests, enable secure mode
set(MI_SECURE "on" CACHE STRING "")

set(MI_BUILD_SHARED "off" CACHE STRING "")
set(MI_BUILD_TESTS "off" CACHE STRING "")
set(MI_OVERRIDE "off" CACHE STRING "")

add_subdirectory(depends/relic)
add_subdirectory(depends/minialloc)
add_subdirectory(depends/mimalloc)

add_subdirectory(src)

Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CLEANFILES =

include Makefile.bls.include

CLEANFILES += $(LIBRELIC) $(LIBDASHBLS) $(LIBMINIALLOC)
CLEANFILES += $(LIBRELIC) $(LIBDASHBLS) $(LIBMIMALLOC)

if USE_TESTS
CLEANFILES += $(DASHBLS_RUNTEST)
Expand Down
10 changes: 5 additions & 5 deletions Makefile.bls.include
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

LIBDASHBLS = libdashbls.la

DASHBLS_CPPFLAGS = -DBLSALLOC_MINIALLOC=1
DASHBLS_CPPFLAGS = -DBLSALLOC_MIMALLOC=1

DASHBLS_INCLUDES = \
-I$(builddir) \
Expand Down Expand Up @@ -40,19 +40,19 @@ libdashbls_la_SOURCES = \

libdashbls_la_SOURCES += \
$(DASHBLS_H) \
$(MINIALLOC_H) \
$(MIMALLOC_H) \
$(RELIC_H)

libdashbls_la_LIBADD = \
$(LIBMINIALLOC) \
$(LIBMIMALLOC) \
$(LIBRELIC) \
$(GMP_LIBS)

libdashbls_la_CPPFLAGS = $(AM_CPPFLAGS) $(RELIC_INCLUDES) $(MINIALLOC_INCLUDES) $(DASHBLS_INCLUDES) $(DASHBLS_CPPFLAGS)
libdashbls_la_CPPFLAGS = $(AM_CPPFLAGS) $(RELIC_INCLUDES) $(MIMALLOC_INCLUDES) $(DASHBLS_INCLUDES) $(DASHBLS_CPPFLAGS)
libdashbls_la_CXXFLAGS = $(AM_CXXFLAGS)
libdashbls_la_LDFLAGS = $(AM_LDFLAGS)

include Makefile.minialloc.include
include Makefile.mimalloc.include
include Makefile.relic.include

if USE_TESTS
Expand Down
44 changes: 44 additions & 0 deletions Makefile.mimalloc.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2022 The Dash Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING.MIT or http://www.opensource.org/licenses/mit-license.php.

LIBMIMALLOC = libmimalloc-secure.la

MIMALLOC_CFLAGS = \
-DMI_SECURE=4 \
-DNDEBUG

MIMALLOC_INCLUDES = \
-I$(top_srcdir)/depends/mimalloc/include \
-I$(top_srcdir)/depends/mimalloc/src

MIMALLOC_H = \
depends/mimalloc/include/mimalloc.h \
depends/mimalloc/include/mimalloc-atomic.h \
depends/mimalloc/include/mimalloc-internal.h \
depends/mimalloc/include/mimalloc-new-delete.h \
depends/mimalloc/include/mimalloc-override.h \
depends/mimalloc/include/mimalloc-track.h \
depends/mimalloc/include/mimalloc-types.h \
depends/mimalloc/src/bitmap.h

libmimalloc_secure_la_SOURCES = \
$(MIMALLOC_H) \
depends/mimalloc/src/stats.c \
depends/mimalloc/src/random.c \
depends/mimalloc/src/os.c \
depends/mimalloc/src/bitmap.c \
depends/mimalloc/src/arena.c \
depends/mimalloc/src/segment-cache.c \
depends/mimalloc/src/segment.c \
depends/mimalloc/src/page.c \
depends/mimalloc/src/alloc.c \
depends/mimalloc/src/alloc-aligned.c \
depends/mimalloc/src/alloc-posix.c \
depends/mimalloc/src/heap.c \
depends/mimalloc/src/options.c \
depends/mimalloc/src/init.c

libmimalloc_secure_la_CFLAGS = $(AM_CFLAGS) $(MIMALLOC_INCLUDES) $(MIMALLOC_CFLAGS)

noinst_LTLIBRARIES += $(LIBMIMALLOC)
30 changes: 0 additions & 30 deletions Makefile.minialloc.include

This file was deleted.

13 changes: 2 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -660,20 +660,11 @@ CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO"
case $host in
*mingw*)
TARGET_OS=windows
AC_CHECK_LIB([kernel32], [GetModuleFileNameA], [], [AC_MSG_ERROR([libkernel32 missing])])
AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])])
AC_CHECK_LIB([gdi32], [main], [], [AC_MSG_ERROR([libgdi32 missing])])
AC_CHECK_LIB([comdlg32], [main], [], [AC_MSG_ERROR([libcomdlg32 missing])])
AC_CHECK_LIB([winmm], [main], [], [AC_MSG_ERROR([libwinmm missing])])
AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])])
AC_CHECK_LIB([comctl32], [main], [], [AC_MSG_ERROR([libcomctl32 missing])])
AC_CHECK_LIB([ole32], [CoCreateInstance], [], [AC_MSG_ERROR([libole32 missing])])
AC_CHECK_LIB([oleaut32], [main], [], [AC_MSG_ERROR([liboleaut32 missing])])
AC_CHECK_LIB([uuid], [main], [], [AC_MSG_ERROR([libuuid missing])])
AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])])
AC_CHECK_LIB([ws2_32], [WSAStartup], [], [AC_MSG_ERROR([libws2_32 missing])])
AC_CHECK_LIB([shlwapi], [PathRemoveFileSpecW], [], [AC_MSG_ERROR([libshlwapi missing])])
AC_CHECK_LIB([iphlpapi], [GetAdaptersAddresses], [], [AC_MSG_ERROR([libiphlpapi missing])])
AC_CHECK_LIB([psapi], [GetProcessMemoryInfo], [], [AC_MSG_ERROR([libpsapi missing])])
AC_CHECK_LIB([bcrypt], [main], [], [AC_MSG_ERROR([libbcrypt missing])])

dnl -static is interpreted by libtool, where it has a different meaning.
dnl In libtool-speak, it's -all-static.
Expand Down
Loading

0 comments on commit 8bf0c81

Please sign in to comment.