From 1c4da332ee6e0d948f85a63f74cb27e89075c011 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 8 Dec 2022 14:37:56 +0000 Subject: 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 --- src/mm-context.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mm-context.c') 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 -- cgit v1.2.3-70-g09d2