mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 11:14:05 +02:00
Merge branch 'static' into 'main'
tests: skip shared libs if default_library=static See merge request GNOME/glib!2867
This commit is contained in:
@@ -227,7 +227,7 @@ if host_machine.system() != 'windows'
|
|||||||
}
|
}
|
||||||
|
|
||||||
# LD_PRELOAD modules don't work so well with AddressSanitizer
|
# LD_PRELOAD modules don't work so well with AddressSanitizer
|
||||||
if have_rtld_next and get_option('b_sanitize') == 'none'
|
if have_rtld_next and get_option('default_library') != 'static' and get_option('b_sanitize') == 'none'
|
||||||
gio_tests += {
|
gio_tests += {
|
||||||
'gsocketclient-slow' : {
|
'gsocketclient-slow' : {
|
||||||
'depends' : [
|
'depends' : [
|
||||||
@@ -656,25 +656,27 @@ if meson.can_run_host_binaries()
|
|||||||
|
|
||||||
compiler_type = '--compiler=@0@'.format(cc.get_id())
|
compiler_type = '--compiler=@0@'.format(cc.get_id())
|
||||||
|
|
||||||
plugin_resources_c = custom_target('plugin-resources.c',
|
if get_option('default_library') != 'static'
|
||||||
input : 'test4.gresource.xml',
|
plugin_resources_c = custom_target('plugin-resources.c',
|
||||||
output : 'plugin-resources.c',
|
input : 'test4.gresource.xml',
|
||||||
command : [glib_compile_resources,
|
output : 'plugin-resources.c',
|
||||||
compiler_type,
|
command : [glib_compile_resources,
|
||||||
'--target=@OUTPUT@',
|
compiler_type,
|
||||||
'--sourcedir=' + meson.current_source_dir(),
|
'--target=@OUTPUT@',
|
||||||
'--internal',
|
'--sourcedir=' + meson.current_source_dir(),
|
||||||
'--generate-source',
|
'--internal',
|
||||||
'--c-name', '_g_plugin',
|
'--generate-source',
|
||||||
'@INPUT@'])
|
'--c-name', '_g_plugin',
|
||||||
|
'@INPUT@'])
|
||||||
|
|
||||||
shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
||||||
link_args : export_dynamic_ldflags,
|
link_args : export_dynamic_ldflags,
|
||||||
dependencies : common_gio_tests_deps,
|
dependencies : common_gio_tests_deps,
|
||||||
install_dir : installed_tests_execdir,
|
install_dir : installed_tests_execdir,
|
||||||
install_tag : 'tests',
|
install_tag : 'tests',
|
||||||
install : installed_tests_enabled
|
install : installed_tests_enabled
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
# referenced by test2.gresource.xml
|
# referenced by test2.gresource.xml
|
||||||
big_test_resource = custom_target(
|
big_test_resource = custom_target(
|
||||||
@@ -976,4 +978,7 @@ if installed_tests_enabled
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('services')
|
subdir('services')
|
||||||
subdir('modules')
|
|
||||||
|
if get_option('default_library') != 'static'
|
||||||
|
subdir('modules')
|
||||||
|
endif
|
||||||
|
@@ -204,7 +204,7 @@ else
|
|||||||
'include' : {},
|
'include' : {},
|
||||||
'unix' : {},
|
'unix' : {},
|
||||||
}
|
}
|
||||||
if have_rtld_next
|
if have_rtld_next and get_option('default_library') != 'static'
|
||||||
glib_tests += {
|
glib_tests += {
|
||||||
'gutils-user-database' : {
|
'gutils-user-database' : {
|
||||||
'depends' : [
|
'depends' : [
|
||||||
|
@@ -37,22 +37,24 @@ if ['darwin', 'ios'].contains(host_machine.system())
|
|||||||
module_suffix = 'so'
|
module_suffix = 'so'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach module : ['moduletestplugin_a', 'moduletestplugin_b']
|
if get_option('default_library') != 'static'
|
||||||
shared_module(module + '_plugin', 'lib@0@.c'.format(module),
|
foreach module : ['moduletestplugin_a', 'moduletestplugin_b']
|
||||||
dependencies : [libglib_dep, libgmodule_dep],
|
shared_module(module + '_plugin', 'lib@0@.c'.format(module),
|
||||||
install_dir : installed_tests_execdir,
|
dependencies : [libglib_dep, libgmodule_dep],
|
||||||
install_tag : 'tests',
|
install_dir : installed_tests_execdir,
|
||||||
install : installed_tests_enabled,
|
install_tag : 'tests',
|
||||||
name_suffix : module_suffix
|
install : installed_tests_enabled,
|
||||||
)
|
name_suffix : module_suffix
|
||||||
shared_library(module + '_library', 'lib@0@.c'.format(module),
|
)
|
||||||
dependencies : [libglib_dep, libgmodule_dep],
|
shared_library(module + '_library', 'lib@0@.c'.format(module),
|
||||||
install_dir : installed_tests_execdir,
|
dependencies : [libglib_dep, libgmodule_dep],
|
||||||
install_tag : 'tests',
|
install_dir : installed_tests_execdir,
|
||||||
install : installed_tests_enabled,
|
install_tag : 'tests',
|
||||||
name_suffix : module_suffix
|
install : installed_tests_enabled,
|
||||||
)
|
name_suffix : module_suffix
|
||||||
endforeach
|
)
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment()
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
|
Reference in New Issue
Block a user