meson: use shared_library for target used by linker
Meson has shared_library and shared_module. The latter should be used only for shared plugins loaded by dlopen, not for shared libraries linked by the linker. The target `nm_wwan` was defined as shared_module probably because it is a library for loadable plugins only, andcontains references to symbols from the main executable that cannot be resolved at link time. Do as the deprecation message suggest and convert it to shared_library with b_lundef=false: DEPRECATION: target nm-device-plugin-wwan links against shared module nm-wwan, which is incorrect. This will be an error in the future, so please use shared_library() for nm-wwan instead. If shared_module() was used for nm-wwan because it has references to undefined symbols, use shared_library() with `override_options: ['b_lundef=false']` instead.
This commit is contained in:

committed by
Íñigo Huguet

parent
ef2438414f
commit
873e66a03e
@@ -4,7 +4,7 @@ wwan_inc = include_directories('.')
|
||||
|
||||
linker_script = join_paths(meson.current_source_dir(), 'libnm-wwan.ver')
|
||||
|
||||
libnm_wwan = shared_module(
|
||||
libnm_wwan = shared_library(
|
||||
'nm-wwan',
|
||||
sources: files(
|
||||
'nm-service-providers.c',
|
||||
@@ -21,6 +21,7 @@ libnm_wwan = shared_module(
|
||||
link_depends: linker_script,
|
||||
install: true,
|
||||
install_dir: nm_plugindir,
|
||||
override_options: ['b_lundef=false'],
|
||||
)
|
||||
|
||||
libnm_wwan_dep = declare_dependency(
|
||||
|
Reference in New Issue
Block a user