mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-22 19:49:36 +00:00
#1026 Probably fixed iOS build.
This commit is contained in:
parent
242ece7222
commit
f620ffe899
3 changed files with 14 additions and 2 deletions
|
@ -81,3 +81,10 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
|
|||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
check_symbol_exists("__builtin___clear_cache" "stdlib.h" HAVE_BUILTIN_CLEAR_CACHE)
|
||||
if (HAVE_BUILTIN_CLEAR_CACHE)
|
||||
add_definitions(/DHAVE_BUILTIN_CLEAR_CACHE)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -25,7 +25,8 @@
|
|||
#include <string.h>
|
||||
#include <thread>
|
||||
|
||||
#if __ARM_FEATURE_CRYPTO
|
||||
|
||||
#if __ARM_FEATURE_CRYPTO && !defined(__APPLE__)
|
||||
# include <sys/auxv.h>
|
||||
# include <asm/hwcap.h>
|
||||
#endif
|
||||
|
@ -47,7 +48,11 @@ xmrig::BasicCpuInfo::BasicCpuInfo() :
|
|||
# endif
|
||||
|
||||
# if __ARM_FEATURE_CRYPTO
|
||||
# if !defined(__APPLE__)
|
||||
m_aes = getauxval(AT_HWCAP) & HWCAP_AES;
|
||||
# else
|
||||
m_aes = true;
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void *xmrig::VirtualMemory::allocateLargePagesMemory(size_t size)
|
|||
|
||||
void xmrig::VirtualMemory::flushInstructionCache(void *p, size_t size)
|
||||
{
|
||||
# ifndef __FreeBSD__
|
||||
# ifdef HAVE_BUILTIN_CLEAR_CACHE
|
||||
__builtin___clear_cache(reinterpret_cast<char*>(p), reinterpret_cast<char*>(p) + size);
|
||||
# endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue