move-only: Extract common/args and common/config.cpp from util/system

This is an extraction of ArgsManager related functions from util/system
into their own common file.

Config file related functions are moved to common/config.cpp.

The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager. The ArgsManager belongs
into the common library, since the kernel library should not depend on
it. See doc/design/libraries.md for more information on this rationale.
This commit is contained in:
TheCharlatan
2023-03-23 12:23:29 +01:00
parent 369d4c03b7
commit be55f545d5
113 changed files with 1655 additions and 1545 deletions

View File

@ -9,6 +9,7 @@
#include <chainparams.h>
#include <chainparamsbase.h>
#include <clientversion.h>
#include <common/args.h>
#include <common/url.h>
#include <compat/compat.h>
#include <interfaces/init.h>
@ -99,7 +100,7 @@ MAIN_FUNCTION
{
ArgsManager& args = gArgs;
#ifdef WIN32
util::WinCmdLineArgs winArgs;
common::WinCmdLineArgs winArgs;
std::tie(argc, argv) = winArgs.get();
#endif