mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:34:13 +08:00
mdbx: fix build for ARM/ARM64 by MSVC.
This commit is contained in:
parent
e3b0602664
commit
1ec5687d36
@ -611,7 +611,7 @@ endmacro()
|
|||||||
macro(libmdbx_setup_libs TARGET MODE)
|
macro(libmdbx_setup_libs TARGET MODE)
|
||||||
target_link_libraries(${TARGET} ${MODE} Threads::Threads)
|
target_link_libraries(${TARGET} ${MODE} Threads::Threads)
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
target_link_libraries(${TARGET} ${MODE} ntdll)
|
target_link_libraries(${TARGET} ${MODE} ntdll advapi32)
|
||||||
if(MDBX_NTDLL_EXTRA_IMPLIB AND MDBX_WITHOUT_MSVC_CRT)
|
if(MDBX_NTDLL_EXTRA_IMPLIB AND MDBX_WITHOUT_MSVC_CRT)
|
||||||
target_link_libraries(${TARGET} ${MODE} ntdll_extra)
|
target_link_libraries(${TARGET} ${MODE} ntdll_extra)
|
||||||
endif()
|
endif()
|
||||||
|
@ -72,7 +72,7 @@ static
|
|||||||
# pragma const_seg(push)
|
# pragma const_seg(push)
|
||||||
# pragma data_seg(push)
|
# pragma data_seg(push)
|
||||||
|
|
||||||
# ifdef _WIN64
|
# ifndef _M_IX86
|
||||||
/* kick a linker to create the TLS directory if not already done */
|
/* kick a linker to create the TLS directory if not already done */
|
||||||
# pragma comment(linker, "/INCLUDE:_tls_used")
|
# pragma comment(linker, "/INCLUDE:_tls_used")
|
||||||
/* Force some symbol references. */
|
/* Force some symbol references. */
|
||||||
@ -94,7 +94,7 @@ static
|
|||||||
# pragma const_seg(pop)
|
# pragma const_seg(pop)
|
||||||
|
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
# ifdef _WIN64
|
# ifndef _M_IX86
|
||||||
const
|
const
|
||||||
# endif
|
# endif
|
||||||
PIMAGE_TLS_CALLBACK mdbx_tls_anchor __attribute__((__section__(".CRT$XLB"), used)) = mdbx_module_handler;
|
PIMAGE_TLS_CALLBACK mdbx_tls_anchor __attribute__((__section__(".CRT$XLB"), used)) = mdbx_module_handler;
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#define rot64(v, s) _rotr64(v, s)
|
#define rot64(v, s) _rotr64(v, s)
|
||||||
#define rot32(v, s) _rotr(v, s)
|
#define rot32(v, s) _rotr(v, s)
|
||||||
|
|
||||||
#if defined(_M_ARM64) || defined(_M_X64) || defined(_M_IA64)
|
#if defined(_M_X64) || defined(_M_IA64)
|
||||||
#pragma intrinsic(_umul128)
|
#pragma intrinsic(_umul128)
|
||||||
#define mul_64x64_128(a, b, ph) _umul128(a, b, ph)
|
#define mul_64x64_128(a, b, ph) _umul128(a, b, ph)
|
||||||
#pragma intrinsic(__umulh)
|
#pragma intrinsic(__umulh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user