lix/src/meson.build
Rebecca Turner b63d4a0c62
Remove static initializers for RegisterLegacyCommand
This moves the "legacy"/"nix2" commands under a new `src/legacy/`
directory, instead of being scattered around in a bunch of different
directories.

A new `liblegacy` build target is defined, and the `nix` binary is
linked against it.

Then, `RegisterLegacyCommand` is replaced with `LegacyCommand::add`
calls in functions like `registerNixCollectGarbage()`. These
registration functions are called explicitly in `src/nix/main.cc`.

See: #359

Change-Id: Id450ffc3f793374907599cfcc121863b792aac1a
2024-10-01 16:08:58 -07:00

35 lines
970 B
Meson

# Subcomponents: these link into artifacts themselves, and have interdependencies.
subdir('lix-doc')
subdir('libutil')
# Load-bearing order. libstore depends on libutil.
subdir('libstore')
# libfetchers depends on libstore
subdir('libfetchers')
# libexpr depends on all of the above
subdir('libexpr')
# libmain depends on libutil and libstore
subdir('libmain')
# libcmd depends on everything
subdir('libcmd')
# The rest of the subdirectories aren't separate components,
# just source files in another directory, so we process them here.
# Static library that just sets default ASan options. It needs to be included
# in every executable.
asanoptions = static_library(
'libasanoptions',
files('asan-options/asan-options.cc'),
)
libasanoptions = declare_dependency(
link_whole: asanoptions
)
# Legacy commands.
subdir('legacy')
# Finally, the nix command itself, which all of the other commands are implmented in terms of
# as a multicall binary.
subdir('nix')