aboutsummaryrefslogtreecommitdiff
path: root/src/mm-context.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2022-12-08 14:37:56 +0000
committerAleksander Morgado <aleksander@aleksander.es>2023-01-03 13:56:25 +0000
commit1c4da332ee6e0d948f85a63f74cb27e89075c011 (patch)
tree03a01bf796b4d435cd233c89ed3d05c562ed3fd1 /src/mm-context.c
parent1dd70be4c834ba025ff16b343aa4032a8c64fb71 (diff)
build: new option to build plugins within the daemon binary
Instead of creating libmm-plugin* and libmm-shared* libraries that are dlopen()-ed on runtime, allow incorporating all plugins into the daemon binary itself. This makes the startup of the daemon much faster and also avoids issues with builds that require linker namespace isolation. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/674
Diffstat (limited to 'src/mm-context.c')
-rw-r--r--src/mm-context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-context.c b/src/mm-context.c
index 883fc2a1..9deeb312 100644
--- a/src/mm-context.c
+++ b/src/mm-context.c
@@ -229,7 +229,9 @@ static gboolean test_session;
#if defined WITH_TESTS
static gboolean test_enable;
#endif
+#if !defined WITH_BUILTIN_PLUGINS
static gchar *test_plugin_dir;
+#endif
#if defined WITH_UDEV
static gboolean test_no_udev;
#endif
@@ -258,11 +260,13 @@ static const GOptionEntry test_entries[] = {
NULL
},
#endif
+#if !defined WITH_BUILTIN_PLUGINS
{
"test-plugin-dir", 0, 0, G_OPTION_ARG_FILENAME, &test_plugin_dir,
"Path to look for plugins",
"[PATH]"
},
+#endif
#if defined WITH_UDEV
{
"test-no-udev", 0, 0, G_OPTION_ARG_NONE, &test_no_udev,
@@ -332,11 +336,13 @@ mm_context_get_test_enable (void)
}
#endif
+#if !defined WITH_BUILTIN_PLUGINS
const gchar *
mm_context_get_test_plugin_dir (void)
{
return test_plugin_dir ? test_plugin_dir : PLUGINDIR;
}
+#endif
#if defined WITH_UDEV
gboolean