1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 23:12:44 +01:00

Remove static data from headers

We don't want to duplicate any of these across libraries, which is what
happens when the platform doesn't support unique symbols.
This commit is contained in:
David McFarland 2025-11-12 19:52:29 -04:00
parent 3645671570
commit 1b5af49fd0
10 changed files with 37 additions and 26 deletions

View file

@ -2,6 +2,7 @@
#include <nlohmann/json.hpp>
#include "nix/cmd/command.hh"
#include "nix/cmd/legacy.hh"
#include "nix/cmd/markdown.hh"
#include "nix/store/store-open.hh"
#include "nix/store/local-fs-store.hh"
@ -14,6 +15,18 @@
namespace nix {
RegisterCommand::Commands & RegisterCommand::commands()
{
static RegisterCommand::Commands commands;
return commands;
}
RegisterLegacyCommand::Commands & RegisterLegacyCommand::commands()
{
static RegisterLegacyCommand::Commands commands;
return commands;
}
nix::Commands RegisterCommand::getCommandsFor(const std::vector<std::string> & prefix)
{
nix::Commands res;