Added support for write custom MSR.

This commit is contained in:
XMRig 2019-12-17 02:27:07 +07:00
parent 33e7a54c29
commit 8bef964f68
No known key found for this signature in database
GPG key ID: 446A53638BE94409
15 changed files with 408 additions and 106 deletions

View file

@ -79,10 +79,21 @@ if (WITH_RANDOMX)
)
endif()
if (WIN32)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_windows.cpp)
elseif (XMRIG_OS_LINUX AND NOT XMRIG_ARM)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_linux.cpp)
if (WITH_MSR AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
add_definitions(/DXMRIG_FEATURE_MSR)
message("-- WITH_MSR=ON")
if (XMRIG_OS_WIN)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_windows.cpp)
elseif (XMRIG_OS_LINUX)
list(APPEND SOURCES_CRYPTO src/crypto/rx/Rx_linux.cpp)
endif()
list(APPEND HEADERS_CRYPTO src/crypto/rx/msr/MsrItem.h)
list(APPEND SOURCES_CRYPTO src/crypto/rx/msr/MsrItem.cpp)
else()
remove_definitions(/DXMRIG_FEATURE_MSR)
message("-- WITH_MSR=OFF")
endif()
else()
remove_definitions(/DXMRIG_ALGO_RANDOMX)