-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #17398: build: Update leveldb to 1.22+
677fb8e test: Add ubsan surpression for crc32c (Wladimir J. van der Laan) 8e68bb1 build: Disable msvc warning 4722 for leveldb build (Aaron Clauson) be23949 build: MSVC changes for leveldb update (Aaron Clauson) 9ebdf04 build: CRC32C build system integration (Wladimir J. van der Laan) 402252a build: Add LCOV exception for crc32c (Wladimir J. van der Laan) 3a037d0 test: Add crc32c exception to various linters and generation scripts (Wladimir J. van der Laan) 84ff1b2 test: Add crc32c to subtree check linter (Wladimir J. van der Laan) 7cf13a5 doc: Add crc32c subtree to developer notes (Wladimir J. van der Laan) 24d02a9 build: Update build system for new leveldb (Wladimir J. van der Laan) 2e18193 Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 (Wladimir J. van der Laan) 6648082 Squashed 'src/leveldb/' changes from f545dfa..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 (Wladimir J. van der Laan) Pull request description: This updates leveldb to currently newest upstream commit bitcoin-core/leveldb-subtree@0c40829: - CRC32C hardware acceleration is now an external library [crc32c](https://github.com/google/crc32c). This adds acceleration on ARM, and should be faster on x86 because of using prefetch. It also makes it easy to support similar instruction sets on other platforms in the future. - Thread handling uses C++11, instead of platform specific code. - Native windows environment was added. No need to maintain our own hacky one, anymore. - Upstream now builds using CMake. This doesn't mean we need to use that (phew), but internal configuration changed to a a series of checks, instead of OS profiles. This means the blanket error "Cannot build leveldb for $host. Please file a bug report' is removed. All changes: google/leveldb@a53934a...0c40829 Pretty much all our changes have been subsumed by upstream, so we figured it was cleaner to start over with a new branch from upstream with the still-relevant patches applied: https://github.com/bitcoin-core/leveldb/tree/bitcoin-fork-new There's quite some testing to be done (see below). See bitcoin-core/leveldb-subtree#25 and bitcoin-core/leveldb-subtree#26 for more history and context. TODO: - [x] Subtree `crc32c` - [x] Make linters happy about crc32 subtree - [x] Integrate `crc32c` library into build system - [x] MSVC build system ACKs for top commit: sipa: ACK 677fb8e Tree-SHA512: 37ee92a750e053e924bc4626b12bb3fd81faa9f8c5ebaa343931fee810c45ba05aa6051fdea82535fa351bf2be7297801b98af9469865fc5ead771650a5d6240
- Loading branch information
Showing
212 changed files
with
11,520 additions
and
7,937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Copyright (c) 2019 The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
LIBCRC32C_INT = crc32c/libcrc32c.a | ||
LIBLEVELDB_SSE42_INT = leveldb/libleveldb_sse42.a | ||
|
||
EXTRA_LIBRARIES += $(LIBCRC32C_INT) | ||
|
||
LIBCRC32C = $(LIBCRC32C_INT) | ||
|
||
CRC32C_CPPFLAGS_INT = | ||
CRC32C_CPPFLAGS_INT += -I$(srcdir)/crc32c/include | ||
CRC32C_CPPFLAGS_INT += -DHAVE_BUILTIN_PREFETCH=@HAVE_BUILTIN_PREFETCH@ | ||
CRC32C_CPPFLAGS_INT += -DHAVE_MM_PREFETCH=@HAVE_MM_PREFETCH@ | ||
CRC32C_CPPFLAGS_INT += -DHAVE_STRONG_GETAUXVAL=@HAVE_STRONG_GETAUXVAL@ | ||
CRC32C_CPPFLAGS_INT += -DHAVE_WEAK_GETAUXVAL=@HAVE_WEAK_GETAUXVAL@ | ||
CRC32C_CPPFLAGS_INT += -DCRC32C_TESTS_BUILT_WITH_GLOG=0 | ||
|
||
if ENABLE_SSE42 | ||
CRC32C_CPPFLAGS_INT += -DHAVE_SSE42=1 | ||
else | ||
CRC32C_CPPFLAGS_INT += -DHAVE_SSE42=0 | ||
endif | ||
|
||
if ENABLE_ARM_CRC | ||
CRC32C_CPPFLAGS_INT += -DHAVE_ARM64_CRC32C=1 | ||
else | ||
CRC32C_CPPFLAGS_INT += -DHAVE_ARM64_CRC32C=0 | ||
endif | ||
|
||
if WORDS_BIGENDIAN | ||
CRC32C_CPPFLAGS_INT += -DBYTE_ORDER_BIG_ENDIAN=1 | ||
else | ||
CRC32C_CPPFLAGS_INT += -DBYTE_ORDER_BIG_ENDIAN=0 | ||
endif | ||
|
||
crc32c_libcrc32c_a_CPPFLAGS = $(AM_CPPFLAGS) $(CRC32C_CPPFLAGS_INT) $(CRC32C_CPPFLAGS) | ||
crc32c_libcrc32c_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) | ||
|
||
crc32c_libcrc32c_a_SOURCES = | ||
crc32c_libcrc32c_a_SOURCES += crc32c/include/crc32c/crc32c.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_arm64.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_arm64_linux_check.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_internal.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_prefetch.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_read_le.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_round_up.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_sse42_check.h | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_sse42.h | ||
|
||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c.cc | ||
crc32c_libcrc32c_a_SOURCES += crc32c/src/crc32c_portable.cc | ||
|
||
if ENABLE_SSE42 | ||
LIBCRC32C_SSE42_INT = crc32c/libcrc32c_sse42.a | ||
EXTRA_LIBRARIES += $(LIBCRC32C_SSE42_INT) | ||
LIBCRC32C += $(LIBCRC32C_SSE42_INT) | ||
|
||
crc32c_libcrc32c_sse42_a_CPPFLAGS = $(crc32c_libcrc32c_a_CPPFLAGS) | ||
crc32c_libcrc32c_sse42_a_CXXFLAGS = $(crc32c_libcrc32c_a_CXXFLAGS) $(SSE42_CXXFLAGS) | ||
|
||
crc32c_libcrc32c_sse42_a_SOURCES = crc32c/src/crc32c_sse42.cc | ||
endif | ||
|
||
if ENABLE_ARM_CRC | ||
LIBCRC32C_ARM_CRC_INT = crc32c/libcrc32c_arm_crc.a | ||
EXTRA_LIBRARIES += $(LIBCRC32C_ARM_CRC_INT) | ||
LIBCRC32C += $(LIBCRC32C_ARM_CRC_INT) | ||
|
||
crc32c_libcrc32c_arm_crc_a_CPPFLAGS = $(crc32c_libcrc32c_a_CPPFLAGS) | ||
crc32c_libcrc32c_arm_crc_a_CXXFLAGS = $(crc32c_libcrc32c_a_CXXFLAGS) $(ARM_CRC_CXXFLAGS) | ||
|
||
crc32c_libcrc32c_arm_crc_a_SOURCES = crc32c/src/crc32c_arm64.cc | ||
endif |
Oops, something went wrong.