mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
deleted unused code, support for logrotate, update in block validation code
This commit is contained in:
parent
2b734e170c
commit
47814dca3d
44 changed files with 175 additions and 4196 deletions
|
|
@ -19,6 +19,56 @@ if (TON_REAL_BINARY_DIR STREQUAL TON_REAL_SOURCE_DIR)
|
|||
message(FATAL_ERROR "In-source build failed.")
|
||||
endif()
|
||||
|
||||
# HAVE_SSE42 for crc32c and rocksdb
|
||||
include(CheckCXXSourceCompiles)
|
||||
# Check for SSE4.2 support in the compiler.
|
||||
set(OLD_CMAKE_REQURED_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /arch:AVX")
|
||||
else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -msse4.2")
|
||||
endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
check_cxx_source_compiles("
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#else // !defined(_MSC_VER)
|
||||
#include <cpuid.h>
|
||||
#include <nmmintrin.h>
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
int main() {
|
||||
_mm_crc32_u8(0, 0); _mm_crc32_u32(0, 0);
|
||||
#if defined(_M_X64) || defined(__x86_64__)
|
||||
_mm_crc32_u64(0, 0);
|
||||
#endif // defined(_M_X64) || defined(__x86_64__)
|
||||
return 0;
|
||||
}
|
||||
" CRC32C_HAVE_SSE42)
|
||||
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQURED_FLAGS})
|
||||
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_REQUIRED_FLAGS "-msse4.2 -mpclmul")
|
||||
endif()
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <cstdint>
|
||||
#include <nmmintrin.h>
|
||||
#include <wmmintrin.h>
|
||||
int main() {
|
||||
volatile uint32_t x = _mm_crc32_u32(0, 0);
|
||||
const auto a = _mm_set_epi64x(0, 0);
|
||||
const auto b = _mm_set_epi64x(0, 0);
|
||||
const auto c = _mm_clmulepi64_si128(a, b, 0x00);
|
||||
auto d = _mm_cvtsi128_si64(c);
|
||||
}
|
||||
" ROCKSDB_HAVE_SSE42)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
|
||||
if (ROCKSDB_HAVE_SSE42 AND CRC32C_HAVE_SSE42)
|
||||
set(HAVE_SSE42 TRUE)
|
||||
else()
|
||||
set(HAVE_SSE42 FALSE)
|
||||
endif()
|
||||
|
||||
#BEGIN internal
|
||||
option(TON_USE_ROCKSDB "Use \"ON\" to enable RocksDb." ON)
|
||||
option(TON_USE_ABSEIL "Use \"ON\" to enable Abseil." ON)
|
||||
|
|
@ -391,16 +441,6 @@ target_link_libraries(test-catchain overlay tdutils tdactor adnl adnltest rldp t
|
|||
#add_executable(test-validator-session test/test-validator-session.cpp)
|
||||
#target_link_libraries(test-validator-session overlay tdutils tdactor adnl tl_api dht
|
||||
# catchain validatorsession)
|
||||
#add_executable(test-ton-dummy-0 test/test-ton-dummy-0.cpp)
|
||||
#target_link_libraries(test-ton-dummy-0 overlay tdutils tdactor adnl tl_api dht
|
||||
# catchain validatorsession ton-node validator dummy_validator validator )
|
||||
#add_executable(test-dummy-0-lite-client test/test-dummy-0-lite-client.cpp)
|
||||
#target_link_libraries(test-dummy-0-lite-client overlay tdutils tdactor adnl tl_api dht
|
||||
# catchain validatorsession ton-node validator dummy_validator validator
|
||||
# terminal )
|
||||
#add_executable(test-ton-dummy-0-collator test/test-ton-collator.cpp)
|
||||
#target_link_libraries(test-ton-dummy-0-collator overlay tdutils tdactor adnl tl_api
|
||||
# dht catchain validatorsession ton-node validator_disk dummy_validator validator_disk )
|
||||
add_executable(test-ton-collator test/test-ton-collator.cpp)
|
||||
target_link_libraries(test-ton-collator overlay tdutils tdactor adnl tl_api dht
|
||||
catchain validatorsession validator-disk ton_validator validator-disk )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue