Build whole CryptonightR_gen.cpp only if ASM used.

This commit is contained in:
XMRig 2019-03-03 17:33:27 +07:00
parent d135bdd87e
commit 4ebfc135e0
3 changed files with 1 additions and 5 deletions

View file

@ -156,7 +156,6 @@ set(SOURCES_CRYPTO
src/crypto/c_blake256.c src/crypto/c_blake256.c
src/crypto/c_jh.c src/crypto/c_jh.c
src/crypto/c_skein.c src/crypto/c_skein.c
src/crypto/CryptonightR_gen.cpp
) )
if (WIN32) if (WIN32)

View file

@ -36,7 +36,7 @@ if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
endif() endif()
add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILES}) add_library(${XMRIG_ASM_LIBRARY} STATIC ${XMRIG_ASM_FILES})
set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp) set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp src/crypto/CryptonightR_gen.cpp)
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C) set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
else() else()
set(XMRIG_ASM_SOURCES "") set(XMRIG_ASM_SOURCES "")

View file

@ -31,7 +31,6 @@ typedef void(*void_func)();
#include "crypto/asm/CryptonightR_template.h" #include "crypto/asm/CryptonightR_template.h"
#include "Mem.h" #include "Mem.h"
#if !defined XMRIG_ARM && !defined XMRIG_NO_ASM
static inline void add_code(uint8_t* &p, void (*p1)(), void (*p2)()) static inline void add_code(uint8_t* &p, void (*p1)(), void (*p2)())
{ {
@ -186,5 +185,3 @@ void v4_soft_aes_compile_code(const V4_Instruction* code, int code_size, void* m
Mem::flushInstructionCache(machine_code, p - p0); Mem::flushInstructionCache(machine_code, p - p0);
} }
#endif