diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fb5015..a83f24d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # v4.0.2-beta - [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd. - [#1185](https://github.com/xmrig/xmrig/pull/1185) Added JIT compiler for RandomX on ARMv8. -- Command line option `--http-enabled` removed, HTTP API enabled automatically if any other `--http-*` option provided. +- Added command line option `--no-cpu` to disable CPU backend. +- Removed command line option `--http-enabled`, HTTP API enabled automatically if any other `--http-*` option provided. # v4.0.1-beta - [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers. diff --git a/src/core/config/ConfigTransform.cpp b/src/core/config/ConfigTransform.cpp index f11fe930..4dc009ad 100644 --- a/src/core/config/ConfigTransform.cpp +++ b/src/core/config/ConfigTransform.cpp @@ -118,6 +118,7 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const return transformUint64(doc, key, static_cast(strtol(arg, nullptr, 10))); case IConfig::HugePagesKey: /* --no-huge-pages */ + case IConfig::CPUKey: /* --no-cpu */ return transformBoolean(doc, key, false); case IConfig::CPUAffinityKey: /* --cpu-affinity */ @@ -151,6 +152,9 @@ void xmrig::ConfigTransform::transformBoolean(rapidjson::Document &doc, int key, case IConfig::HugePagesKey: /* --no-huge-pages */ return set(doc, kCpu, "huge-pages", enable); + case IConfig::CPUKey: /* --no-cpu */ + return set(doc, kCpu, "enabled", enable); + default: break; } diff --git a/src/core/config/Config_platform.h b/src/core/config/Config_platform.h index a10f3c16..d4a0a5b8 100644 --- a/src/core/config/Config_platform.h +++ b/src/core/config/Config_platform.h @@ -80,6 +80,7 @@ static const option options[] = { { "user-agent", 1, nullptr, IConfig::UserAgentKey }, { "userpass", 1, nullptr, IConfig::UserpassKey }, { "rig-id", 1, nullptr, IConfig::RigIdKey }, + { "no-cpu", 0, nullptr, IConfig::CPUKey }, # ifdef XMRIG_FEATURE_TLS { "tls", 0, nullptr, IConfig::TlsKey }, { "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey }, diff --git a/src/core/config/usage.h b/src/core/config/usage.h index 615921b3..f64842ae 100644 --- a/src/core/config/usage.h +++ b/src/core/config/usage.h @@ -71,6 +71,7 @@ static inline const std::string &usage() u += "\nCPU backend:\n"; + u += " --no-cpu disable CPU backend\n"; u += " -t, --threads=N number of CPU threads\n"; u += " -v, --av=N algorithm variation, 0 auto select\n"; u += " --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n";