mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-06 09:26:17 +01:00
dcfc9f689e
There is currently no `dllimport` attribute on any of our function, which prevents MSVC to optimize function calls. To fix that issue, we need to redeclare all our visibility macros for each of our libraries, because when compiling e.g. GIO code, we need dllimport in GLIB headers and dllexport in GIO headers. That means they cannot use the same GLIB_AVAILABLE_* macro. Since that's a lot of boilerplate to copy/paste after each version bump, this MR generate all those macros using a python script. Also simplify the meson side by using `gnu_symbol_visibility : 'hidden'` keyword argument instead of passing the cflag manually. This leaves only API index to add manually into glib-docs.xml when bumping GLib version. That file cannot be generated because Meson does not allow passing a buit file to gnome.gtkdoc()'s main_xml kwarg unfortunately.
20 lines
410 B
Meson
20 lines
410 B
Meson
xdgmime_sources = files(
|
|
'xdgmime.c',
|
|
'xdgmimealias.c',
|
|
'xdgmimecache.c',
|
|
'xdgmimeglob.c',
|
|
'xdgmimeicon.c',
|
|
'xdgmimeint.c',
|
|
'xdgmimemagic.c',
|
|
'xdgmimeparent.c',
|
|
)
|
|
|
|
xdgmime_lib = static_library('xdgmime',
|
|
sources : xdgmime_sources,
|
|
include_directories : [configinc],
|
|
pic : true,
|
|
c_args : [ '-DHAVE_CONFIG_H',
|
|
'-DXDG_PREFIX=_gio_xdg' ],
|
|
gnu_symbol_visibility : 'hidden',
|
|
)
|