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
This commit is contained in:
Aleksander Morgado
2022-12-08 14:37:56 +00:00
committed by Aleksander Morgado
parent 1dd70be4c8
commit 1c4da332ee
17 changed files with 594 additions and 147 deletions

View File

@@ -1,9 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2022 Aleksander Morgado <aleksander@aleksander.es>
test_plugin_dir = ''
if not enable_builtin_plugins
test_plugin_dir = '--test-plugin-dir="' + build_root + '/src/plugins"'
endif
test_conf = {
'abs_top_builddir': build_root,
'PLUGIN_BUILD_SUBDIR': 'src/plugins/',
'test_plugin_dir': test_plugin_dir,
}
configure_file(

View File

@@ -2,4 +2,4 @@
[D-BUS Service]
Name=org.freedesktop.ModemManager1
Exec=@abs_top_builddir@/src/ModemManager --test-session --no-auto-scan --test-enable --test-plugin-dir="@abs_top_builddir@/@PLUGIN_BUILD_SUBDIR@" --debug
Exec=@abs_top_builddir@/src/ModemManager --test-session --no-auto-scan --test-enable @test_plugin_dir@ --debug