diff options
author | Qyriad <qyriad@qyriad.me> | 2024-05-30 17:10:10 -0600 |
---|---|---|
committer | Qyriad <qyriad@qyriad.me> | 2024-05-31 21:47:16 -0600 |
commit | e54d4c9381492d44a69469a0e719fea50e9914f3 (patch) | |
tree | 626b3ddceaefd2c2d133845a0248c2d126624907 /tests/unit/meson.build | |
parent | c7ca87461dff6892b166e46203024cb82bd89e55 (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 'tests/unit/meson.build')
-rw-r--r-- | tests/unit/meson.build | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/meson.build b/tests/unit/meson.build index d8d4a00d1..06aff4626 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -64,7 +64,7 @@ libutil_tester = executable( gtest, boehm, liblixutil, - liblixexpr, + liblixexpr_mstatic, liblixutil_test_support, nlohmann_json, ], @@ -131,7 +131,7 @@ libstore_tester = executable( dependencies : [ liblixstore_test_support, liblixutil_test_support, - liblixstore, + liblixstore_mstatic, liblixutil, rapidcheck, gtest, @@ -194,10 +194,10 @@ libexpr_tester = executable( dependencies : [ liblixexpr_test_support, liblixstore_test_support, - liblixstore, + liblixstore_mstatic, liblixutil, - liblixexpr, - liblixfetchers, + liblixexpr_mstatic, + liblixfetchers_mstatic, rapidcheck, boehm, gtest, @@ -225,8 +225,8 @@ libcmd_tester = executable( liblixcmd, liblixutil, liblixmain, - liblixexpr, - liblixstore, + liblixexpr_mstatic, + liblixstore_mstatic, gtest, boost, ], |