mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-17 08:17:40 +00:00
Fixed msvc2015/msys2 build & code cleanup.
This commit is contained in:
parent
41feb756bf
commit
1bd51dcf2e
7 changed files with 36 additions and 23 deletions
|
@ -5,37 +5,37 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|||
enable_language(ASM_MASM)
|
||||
|
||||
if (MSVC_TOOLSET_VERSION GREATER_EQUAL 141)
|
||||
set(XMRIG_ASM_FILE
|
||||
set(XMRIG_ASM_FILES
|
||||
"src/crypto/asm/cn_main_loop.asm"
|
||||
"src/crypto/asm/CryptonightR_template.asm"
|
||||
)
|
||||
else()
|
||||
set(XMRIG_ASM_FILE
|
||||
set(XMRIG_ASM_FILES
|
||||
"src/crypto/asm/win64/cn_main_loop.asm"
|
||||
"src/crypto/asm/win64/CryptonightR_template.asm"
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE ${XMRIG_ASM_FILE} PROPERTY ASM_MASM)
|
||||
set_property(SOURCE ${XMRIG_ASM_FILES} PROPERTY ASM_MASM)
|
||||
else()
|
||||
enable_language(ASM)
|
||||
|
||||
if (WIN32 AND CMAKE_C_COMPILER_ID MATCHES GNU)
|
||||
set(XMRIG_ASM_FILE
|
||||
set(XMRIG_ASM_FILES
|
||||
"src/crypto/asm/win64/cn_main_loop.S"
|
||||
"src/crypto/asm/win64/CryptonightR_template.S"
|
||||
)
|
||||
else()
|
||||
set(XMRIG_ASM_FILE
|
||||
set(XMRIG_ASM_FILES
|
||||
"src/crypto/asm/cn_main_loop.S"
|
||||
"src/crypto/asm/CryptonightR_template.S"
|
||||
)
|
||||
endif()
|
||||
|
||||
set_property(SOURCE ${XMRIG_ASM_FILE} PROPERTY C)
|
||||
set_property(SOURCE ${XMRIG_ASM_FILES} PROPERTY C)
|
||||
endif()
|
||||
|
||||
add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILE})
|
||||
add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILES})
|
||||
set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp)
|
||||
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
|
||||
else()
|
||||
|
|
|
@ -479,19 +479,19 @@ void xmrig::Pool::rebuild()
|
|||
m_algorithms.push_back(m_algorithm);
|
||||
|
||||
# ifndef XMRIG_PROXY_PROJECT
|
||||
addVariant(xmrig::VARIANT_4);
|
||||
addVariant(xmrig::VARIANT_WOW);
|
||||
addVariant(xmrig::VARIANT_2);
|
||||
addVariant(xmrig::VARIANT_1);
|
||||
addVariant(xmrig::VARIANT_0);
|
||||
addVariant(xmrig::VARIANT_HALF);
|
||||
addVariant(xmrig::VARIANT_XTL);
|
||||
addVariant(xmrig::VARIANT_TUBE);
|
||||
addVariant(xmrig::VARIANT_MSR);
|
||||
addVariant(xmrig::VARIANT_XHV);
|
||||
addVariant(xmrig::VARIANT_XAO);
|
||||
addVariant(xmrig::VARIANT_RTO);
|
||||
addVariant(xmrig::VARIANT_GPU);
|
||||
addVariant(xmrig::VARIANT_AUTO);
|
||||
addVariant(VARIANT_4);
|
||||
addVariant(VARIANT_WOW);
|
||||
addVariant(VARIANT_2);
|
||||
addVariant(VARIANT_1);
|
||||
addVariant(VARIANT_0);
|
||||
addVariant(VARIANT_HALF);
|
||||
addVariant(VARIANT_XTL);
|
||||
addVariant(VARIANT_TUBE);
|
||||
addVariant(VARIANT_MSR);
|
||||
addVariant(VARIANT_XHV);
|
||||
addVariant(VARIANT_XAO);
|
||||
addVariant(VARIANT_RTO);
|
||||
addVariant(VARIANT_GPU);
|
||||
addVariant(VARIANT_AUTO);
|
||||
# endif
|
||||
}
|
||||
|
|
|
@ -529,6 +529,7 @@ PUBLIC FN_PREFIX(CryptonightR_instruction_mov254)
|
|||
PUBLIC FN_PREFIX(CryptonightR_instruction_mov255)
|
||||
PUBLIC FN_PREFIX(CryptonightR_instruction_mov256)
|
||||
|
||||
#include "CryptonightWOW_template.inc"
|
||||
#include "CryptonightR_template.inc"
|
||||
|
||||
FN_PREFIX(CryptonightR_instruction0):
|
||||
|
|
|
@ -516,6 +516,7 @@ PUBLIC CryptonightR_instruction_mov254
|
|||
PUBLIC CryptonightR_instruction_mov255
|
||||
PUBLIC CryptonightR_instruction_mov256
|
||||
|
||||
INCLUDE CryptonightWOW_template_win.inc
|
||||
INCLUDE CryptonightR_template_win.inc
|
||||
|
||||
CryptonightR_instruction0:
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
|
||||
extern "C"
|
||||
{
|
||||
void CryptonightWOW_template_part1();
|
||||
void CryptonightWOW_template_mainloop();
|
||||
void CryptonightWOW_template_part2();
|
||||
void CryptonightWOW_template_part3();
|
||||
void CryptonightWOW_template_end();
|
||||
void CryptonightWOW_template_double_part1();
|
||||
void CryptonightWOW_template_double_mainloop();
|
||||
void CryptonightWOW_template_double_part2();
|
||||
void CryptonightWOW_template_double_part3();
|
||||
void CryptonightWOW_template_double_part4();
|
||||
void CryptonightWOW_template_double_end();
|
||||
|
||||
void CryptonightR_template_part1();
|
||||
void CryptonightR_template_mainloop();
|
||||
void CryptonightR_template_part2();
|
||||
|
@ -13,6 +25,7 @@ extern "C"
|
|||
void CryptonightR_template_double_part3();
|
||||
void CryptonightR_template_double_part4();
|
||||
void CryptonightR_template_double_end();
|
||||
|
||||
void CryptonightR_instruction0();
|
||||
void CryptonightR_instruction1();
|
||||
void CryptonightR_instruction2();
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
|
||||
xmrig::Network::Network(Controller *controller) :
|
||||
m_controller(controller),
|
||||
m_donate(nullptr)
|
||||
{
|
||||
Workers::setListener(this);
|
||||
|
|
|
@ -69,7 +69,6 @@ private:
|
|||
|
||||
static void onTick(uv_timer_t *handle);
|
||||
|
||||
Controller *m_controller;
|
||||
IStrategy *m_donate;
|
||||
IStrategy *m_strategy;
|
||||
NetworkState m_state;
|
||||
|
|
Loading…
Reference in a new issue