Added command line option --no-cpu

This commit is contained in:
XMRig 2019-09-23 05:08:59 +07:00
parent 0f05936e63
commit bdb72684b0
4 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,8 @@
# v4.0.2-beta # v4.0.2-beta
- [#1183](https://github.com/xmrig/xmrig/issues/1183) Fixed compatibility with systemd. - [#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. - [#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 # v4.0.1-beta
- [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers. - [#1177](https://github.com/xmrig/xmrig/issues/1177) Fixed compatibility with old AMD drivers.

View file

@ -118,6 +118,7 @@ void xmrig::ConfigTransform::transform(rapidjson::Document &doc, int key, const
return transformUint64(doc, key, static_cast<uint64_t>(strtol(arg, nullptr, 10))); return transformUint64(doc, key, static_cast<uint64_t>(strtol(arg, nullptr, 10)));
case IConfig::HugePagesKey: /* --no-huge-pages */ case IConfig::HugePagesKey: /* --no-huge-pages */
case IConfig::CPUKey: /* --no-cpu */
return transformBoolean(doc, key, false); return transformBoolean(doc, key, false);
case IConfig::CPUAffinityKey: /* --cpu-affinity */ case IConfig::CPUAffinityKey: /* --cpu-affinity */
@ -151,6 +152,9 @@ void xmrig::ConfigTransform::transformBoolean(rapidjson::Document &doc, int key,
case IConfig::HugePagesKey: /* --no-huge-pages */ case IConfig::HugePagesKey: /* --no-huge-pages */
return set(doc, kCpu, "huge-pages", enable); return set(doc, kCpu, "huge-pages", enable);
case IConfig::CPUKey: /* --no-cpu */
return set(doc, kCpu, "enabled", enable);
default: default:
break; break;
} }

View file

@ -80,6 +80,7 @@ static const option options[] = {
{ "user-agent", 1, nullptr, IConfig::UserAgentKey }, { "user-agent", 1, nullptr, IConfig::UserAgentKey },
{ "userpass", 1, nullptr, IConfig::UserpassKey }, { "userpass", 1, nullptr, IConfig::UserpassKey },
{ "rig-id", 1, nullptr, IConfig::RigIdKey }, { "rig-id", 1, nullptr, IConfig::RigIdKey },
{ "no-cpu", 0, nullptr, IConfig::CPUKey },
# ifdef XMRIG_FEATURE_TLS # ifdef XMRIG_FEATURE_TLS
{ "tls", 0, nullptr, IConfig::TlsKey }, { "tls", 0, nullptr, IConfig::TlsKey },
{ "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey }, { "tls-fingerprint", 1, nullptr, IConfig::FingerprintKey },

View file

@ -71,6 +71,7 @@ static inline const std::string &usage()
u += "\nCPU backend:\n"; u += "\nCPU backend:\n";
u += " --no-cpu disable CPU backend\n";
u += " -t, --threads=N number of CPU threads\n"; u += " -t, --threads=N number of CPU threads\n";
u += " -v, --av=N algorithm variation, 0 auto select\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"; u += " --cpu-affinity set process affinity to CPU core(s), mask 0x3 for cores 0 and 1\n";