mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
meson: fix warnings for extract_all_objects function
The "recursive:" kwarg is available in the targeted minimum version of meson, and is basically required if you want to not emit warnings and maybe error with --fatal-meson-warnings. There are two basic solutions to this problem: - The current default behavior is false, so explicitly opt in to that value. None of these internal libraries use recursive objects anyway. - Use link_with to link to the static library directly, rather than the extracted objects. Option 2 is what used to be done before commit 62af03bda8a1d649b079a0e77d3687695d0ab7d3, but it only works with meson >=0.52 and previously had buggy behavior. Since the minimum version of meson is now 0.52, it is safe to revert that commit and go back to using link_with, and therefore option 2 is chosen.
This commit is contained in:
parent
6163c2c3fe
commit
abb8e1c3a0
@ -341,12 +341,6 @@ local_sources = files(
|
|||||||
|
|
||||||
platform_deps = []
|
platform_deps = []
|
||||||
internal_deps = []
|
internal_deps = []
|
||||||
# TODO: internal_objects is a workaround for
|
|
||||||
# <https://github.com/mesonbuild/meson/issues/3934> and
|
|
||||||
# <https://github.com/mesonbuild/meson/issues/3937>. When we can depend
|
|
||||||
# on a meson version where those are fixed, revert the commit that
|
|
||||||
# introduced this workaround.
|
|
||||||
internal_objects = []
|
|
||||||
appinfo_sources = []
|
appinfo_sources = []
|
||||||
contenttype_sources = []
|
contenttype_sources = []
|
||||||
portal_sources = []
|
portal_sources = []
|
||||||
@ -419,7 +413,6 @@ if host_system != 'windows'
|
|||||||
|
|
||||||
subdir('xdgmime')
|
subdir('xdgmime')
|
||||||
internal_deps += [xdgmime_lib]
|
internal_deps += [xdgmime_lib]
|
||||||
internal_objects += [xdgmime_lib.extract_all_objects()]
|
|
||||||
|
|
||||||
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
|
install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
|
||||||
|
|
||||||
@ -758,20 +751,17 @@ gioenumtypes_dep = declare_dependency(sources : [gioenumtypes_h, glib_enumtypes_
|
|||||||
if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
|
if glib_conf.has('HAVE_SYS_INOTIFY_H') and have_func_inotify_init1
|
||||||
subdir('inotify')
|
subdir('inotify')
|
||||||
internal_deps += [ inotify_lib ]
|
internal_deps += [ inotify_lib ]
|
||||||
internal_objects += [inotify_lib.extract_all_objects()]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# kevent
|
# kevent
|
||||||
if have_func_kqueue and have_func_kevent
|
if have_func_kqueue and have_func_kevent
|
||||||
subdir('kqueue')
|
subdir('kqueue')
|
||||||
internal_deps += [ kqueue_lib ]
|
internal_deps += [ kqueue_lib ]
|
||||||
internal_objects += [kqueue_lib.extract_all_objects()]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_system == 'windows'
|
if host_system == 'windows'
|
||||||
subdir('win32')
|
subdir('win32')
|
||||||
internal_deps += [ giowin32_lib ]
|
internal_deps += [ giowin32_lib ]
|
||||||
internal_objects += [giowin32_lib.extract_all_objects()]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if have_bash
|
if have_bash
|
||||||
@ -807,13 +797,13 @@ endif
|
|||||||
libgio = library('gio-2.0',
|
libgio = library('gio-2.0',
|
||||||
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
|
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
|
||||||
gio_dtrace_hdr, gio_dtrace_obj,
|
gio_dtrace_hdr, gio_dtrace_obj,
|
||||||
objects : internal_objects,
|
|
||||||
version : library_version,
|
version : library_version,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
darwin_versions : darwin_versions,
|
darwin_versions : darwin_versions,
|
||||||
install : true,
|
install : true,
|
||||||
include_directories : [configinc, gioinc],
|
include_directories : [configinc, gioinc],
|
||||||
# '$(gio_win32_res_ldflag)',
|
# '$(gio_win32_res_ldflag)',
|
||||||
|
link_with: internal_deps,
|
||||||
dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep,
|
dependencies : [libz_dep, libdl_dep, libmount_dep, libglib_dep,
|
||||||
libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep,
|
libgobject_dep, libgmodule_dep, selinux_dep, xattr_dep,
|
||||||
platform_deps, network_libs, libsysprof_capture_dep],
|
platform_deps, network_libs, libsysprof_capture_dep],
|
||||||
|
@ -20,14 +20,8 @@ libsysprof_capture_dep = dependency('sysprof-capture-4', version: '>= 3.38.0',
|
|||||||
)
|
)
|
||||||
glib_conf.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
|
glib_conf.set('HAVE_SYSPROF', libsysprof_capture_dep.found())
|
||||||
|
|
||||||
# TODO: gnulib_objects is a workaround for
|
|
||||||
# <https://github.com/mesonbuild/meson/issues/3934> and
|
|
||||||
# <https://github.com/mesonbuild/meson/issues/3937>. When we can depend
|
|
||||||
# on a meson version where those are fixed, revert the commit that
|
|
||||||
# introduced this workaround.
|
|
||||||
if use_system_printf
|
if use_system_printf
|
||||||
gnulib_lib = []
|
gnulib_lib = []
|
||||||
gnulib_objects = []
|
|
||||||
gnulib_libm_dependency = []
|
gnulib_libm_dependency = []
|
||||||
glib_conf.set ('gl_unused', '')
|
glib_conf.set ('gl_unused', '')
|
||||||
glib_conf.set ('gl_extern_inline', '')
|
glib_conf.set ('gl_extern_inline', '')
|
||||||
@ -117,7 +111,6 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('gnulib')
|
subdir('gnulib')
|
||||||
gnulib_objects = [gnulib_lib.extract_all_objects()]
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
glib_headers = files(
|
glib_headers = files(
|
||||||
@ -359,7 +352,6 @@ glib_c_args = ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION'] + pcre_static_args
|
|||||||
libglib = library('glib-2.0',
|
libglib = library('glib-2.0',
|
||||||
glib_dtrace_obj, glib_dtrace_hdr,
|
glib_dtrace_obj, glib_dtrace_hdr,
|
||||||
sources : [deprecated_sources, glib_sources],
|
sources : [deprecated_sources, glib_sources],
|
||||||
objects : [charset_lib.extract_all_objects()] + gnulib_objects,
|
|
||||||
version : library_version,
|
version : library_version,
|
||||||
soversion : soversion,
|
soversion : soversion,
|
||||||
darwin_versions : darwin_versions,
|
darwin_versions : darwin_versions,
|
||||||
@ -367,6 +359,7 @@ libglib = library('glib-2.0',
|
|||||||
# intl.lib is not compatible with SAFESEH
|
# intl.lib is not compatible with SAFESEH
|
||||||
link_args : [noseh_link_args, glib_link_flags, win32_ldflags],
|
link_args : [noseh_link_args, glib_link_flags, win32_ldflags],
|
||||||
include_directories : configinc,
|
include_directories : configinc,
|
||||||
|
link_with: [charset_lib, gnulib_lib],
|
||||||
dependencies : [pcre, thread_dep, librt] + libintl_deps + libiconv + platform_deps + [gnulib_libm_dependency, libm] + [libsysprof_capture_dep],
|
dependencies : [pcre, thread_dep, librt] + libintl_deps + libiconv + platform_deps + [gnulib_libm_dependency, libm] + [libsysprof_capture_dep],
|
||||||
c_args : glib_c_args,
|
c_args : glib_c_args,
|
||||||
objc_args : glib_c_args,
|
objc_args : glib_c_args,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user