diff --git a/src/core/config/Config.cpp b/src/core/config/Config.cpp index 1249b8ba4..f49ba05db 100644 --- a/src/core/config/Config.cpp +++ b/src/core/config/Config.cpp @@ -66,11 +66,14 @@ bool xmrig::Config::read(const IJsonReader &reader, const char *fileName) setAesMode(reader.getValue("hw-aes")); setAlgoVariant(reader.getInt("av")); - setAssembly(reader.getValue("asm")); setMaxCpuUsage(reader.getInt("max-cpu-usage", 100)); setPriority(reader.getInt("cpu-priority", -1)); setThreads(reader.getValue("threads")); +# ifndef XMRIG_NO_ASM + setAssembly(reader.getValue("asm")); +# endif + return finalize(); } @@ -194,12 +197,6 @@ void xmrig::Config::setAlgoVariant(int av) } -void xmrig::Config::setAssembly(const rapidjson::Value &assembly) -{ - m_assembly = Asm::parse(assembly); -} - - void xmrig::Config::setMaxCpuUsage(int max) { if (max > 0 && max <= 100) { @@ -278,3 +275,11 @@ xmrig::AlgoVariant xmrig::Config::getAlgoVariantLite() const return m_algoVariant; } #endif + + +#ifndef XMRIG_NO_ASM +void xmrig::Config::setAssembly(const rapidjson::Value &assembly) +{ + m_assembly = Asm::parse(assembly); +} +#endif diff --git a/src/core/config/Config.h b/src/core/config/Config.h index 19c70cf13..861840c77 100644 --- a/src/core/config/Config.h +++ b/src/core/config/Config.h @@ -85,7 +85,6 @@ private: bool finalize(); void setAesMode(const rapidjson::Value &aesMode); void setAlgoVariant(int av); - void setAssembly(const rapidjson::Value &assembly); void setMaxCpuUsage(int max); void setPriority(int priority); void setThreads(const rapidjson::Value &threads); @@ -95,6 +94,10 @@ private: AlgoVariant getAlgoVariantLite() const; # endif +# ifndef XMRIG_NO_ASM + void setAssembly(const rapidjson::Value &assembly); +# endif + struct Threads {