aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-05-30 17:10:10 -0600
committerQyriad <qyriad@qyriad.me>2024-05-31 21:47:16 -0600
commite54d4c9381492d44a69469a0e719fea50e9914f3 (patch)
tree626b3ddceaefd2c2d133845a0248c2d126624907 /src/nix
parentc7ca87461dff6892b166e46203024cb82bd89e55 (diff)
build: fix static linking with a hack
This causes libstore, libexpr, libfetchers, and libutil to be linked with -Wl,--whole-archive to executables, when building statically. libstore for the store backends, libexpr for the primops, libfetchers for the fetcher backends I assume(?), and libutil for the nix::logger initializer (which notably shows in pre-main constructors when HOME is not owned by the user. cursed.). This workaround should be removed when #359 is fixed. Fixes #306. Change-Id: Ie9ef0154e09a6ed97920ee8ab23810ca5e2de84c
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/meson.build8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/meson.build b/src/nix/meson.build
index 45303641f..8115a3d08 100644
--- a/src/nix/meson.build
+++ b/src/nix/meson.build
@@ -81,10 +81,10 @@ nix = executable(
nix2_commands_sources,
dependencies : [
liblixcmd,
- liblixutil,
- liblixstore,
- liblixexpr,
- liblixfetchers,
+ liblixutil_mstatic,
+ liblixstore_mstatic,
+ liblixexpr_mstatic,
+ liblixfetchers_mstatic,
liblixmain,
boehm,
nlohmann_json,