1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

meson: do not link with libudev

This commit is contained in:
Yu Watanabe 2020-12-14 20:41:32 +09:00
parent 1403fe26d6
commit e4b127e2cc
6 changed files with 36 additions and 44 deletions

View File

@ -1577,7 +1577,6 @@ includes = include_directories('src/basic',
'src/libsystemd/sd-netlink', 'src/libsystemd/sd-netlink',
'src/libsystemd/sd-network', 'src/libsystemd/sd-network',
'src/libsystemd/sd-resolve', 'src/libsystemd/sd-resolve',
'src/libudev',
'src/login', 'src/login',
'src/nspawn', 'src/nspawn',
'src/resolve', 'src/resolve',
@ -3162,7 +3161,7 @@ if conf.get('ENABLE_HWDB') == 1
'src/hwdb/hwdb.c', 'src/hwdb/hwdb.c',
'src/libsystemd/sd-hwdb/hwdb-internal.h', 'src/libsystemd/sd-hwdb/hwdb-internal.h',
include_directories : includes, include_directories : includes,
link_with : [libudev_static], link_with : udev_link_with,
install_rpath : udev_rpath, install_rpath : udev_rpath,
install : true, install : true,
install_dir : rootbindir) install_dir : rootbindir)
@ -3194,8 +3193,7 @@ public_programs += executable(
udevadm_sources, udevadm_sources,
c_args : '-DLOG_REALM=LOG_REALM_UDEV', c_args : '-DLOG_REALM=LOG_REALM_UDEV',
include_directories : includes, include_directories : includes,
link_with : [libudev_core, link_with : [libudevd_core],
libudev_static],
dependencies : [versiondep, dependencies : [versiondep,
threads, threads,
libkmod, libkmod,
@ -3274,7 +3272,6 @@ if conf.get('ENABLE_NETWORKD') == 1
include_directories : network_include_dir, include_directories : network_include_dir,
link_with : [libnetworkd_core, link_with : [libnetworkd_core,
libsystemd_network, libsystemd_network,
libudev_static,
networkd_link_with], networkd_link_with],
dependencies : [threads], dependencies : [threads],
install_rpath : rootlibexecdir, install_rpath : rootlibexecdir,
@ -3412,7 +3409,7 @@ endif
exe = executable( exe = executable(
'test-libudev-sym', 'test-libudev-sym',
test_libudev_sym_c, test_libudev_sym_c,
include_directories : includes, include_directories : libudev_includes,
c_args : '-Wno-deprecated-declarations', c_args : '-Wno-deprecated-declarations',
link_with : [libudev], link_with : [libudev],
build_by_default : want_tests != 'false', build_by_default : want_tests != 'false',
@ -3425,7 +3422,7 @@ endif
exe = executable( exe = executable(
'test-libudev-static-sym', 'test-libudev-static-sym',
test_libudev_sym_c, test_libudev_sym_c,
include_directories : includes, include_directories : libudev_includes,
c_args : '-Wno-deprecated-declarations', c_args : '-Wno-deprecated-declarations',
link_with : [install_libudev_static], link_with : [install_libudev_static],
build_by_default : want_tests != 'false' and static_libudev_pic, build_by_default : want_tests != 'false' and static_libudev_pic,

View File

@ -106,8 +106,7 @@ fuzzers += [
[]], []],
[['src/fuzz/fuzz-udev-rules.c'], [['src/fuzz/fuzz-udev-rules.c'],
[libudev_core, [libudevd_core,
libudev_static,
libshared], libshared],
[threads, [threads,
libacl]], libacl]],

View File

@ -244,7 +244,6 @@ if conf.get('ENABLE_NETWORKD') == 1
[['src/network/fuzz-netdev-parser.c', [['src/network/fuzz-netdev-parser.c',
'src/fuzz/fuzz.h'], 'src/fuzz/fuzz.h'],
[libnetworkd_core, [libnetworkd_core,
libudev_static,
libsystemd_network, libsystemd_network,
networkd_link_with], networkd_link_with],
[threads], [threads],
@ -254,7 +253,6 @@ if conf.get('ENABLE_NETWORKD') == 1
[['src/network/fuzz-network-parser.c', [['src/network/fuzz-network-parser.c',
'src/fuzz/fuzz.h'], 'src/fuzz/fuzz.h'],
[libnetworkd_core, [libnetworkd_core,
libudev_static,
libsystemd_network, libsystemd_network,
networkd_link_with], networkd_link_with],
[threads], [threads],
@ -265,13 +263,11 @@ if conf.get('ENABLE_NETWORKD') == 1
tests += [ tests += [
[['src/network/test-networkd-conf.c'], [['src/network/test-networkd-conf.c'],
[libnetworkd_core, [libnetworkd_core,
libsystemd_network, libsystemd_network],
libudev],
[], '', '', [], network_include_dir], [], '', '', [], network_include_dir],
[['src/network/test-network.c'], [['src/network/test-network.c'],
[libnetworkd_core, [libnetworkd_core,
libudev_static,
libsystemd_network, libsystemd_network,
networkd_link_with], networkd_link_with],
[threads], [threads],
@ -279,14 +275,12 @@ if conf.get('ENABLE_NETWORKD') == 1
[['src/network/test-routing-policy-rule.c'], [['src/network/test-routing-policy-rule.c'],
[libnetworkd_core, [libnetworkd_core,
libsystemd_network, libsystemd_network],
libudev],
[], '', '', [], network_include_dir], [], '', '', [], network_include_dir],
[['src/network/test-network-tables.c', [['src/network/test-network-tables.c',
test_tables_h], test_tables_h],
[libnetworkd_core, [libnetworkd_core,
libudev_static,
libsystemd_network, libsystemd_network,
networkd_link_with], networkd_link_with],
[threads], [threads],

View File

@ -383,7 +383,6 @@ libshared_static = static_library(
libshared = shared_library( libshared = shared_library(
libshared_name, libshared_name,
libudev_sources,
include_directories : includes, include_directories : includes,
link_args : ['-shared', link_args : ['-shared',
'-Wl,--version-script=' + libshared_sym_path], '-Wl,--version-script=' + libshared_sym_path],

View File

@ -52,7 +52,6 @@ tests += [
[['src/test/test-engine.c'], [['src/test/test-engine.c'],
[libcore, [libcore,
libudev,
libshared], libshared],
[threads, [threads,
librt, librt,
@ -520,8 +519,7 @@ tests += [
'src/journal/journald-server.h'], 'src/journal/journald-server.h'],
[libcore, [libcore,
libjournal_core, libjournal_core,
libudev_core, libudevd_core,
libudev_static,
libshared], libshared],
[threads, [threads,
libseccomp, libseccomp,
@ -529,7 +527,7 @@ tests += [
libxz, libxz,
liblz4, liblz4,
libblkid], libblkid],
'', '', [], libudev_core_includes], '', '', [], libudevd_core_includes],
[['src/test/test-prioq.c'], [['src/test/test-prioq.c'],
[], [],
@ -751,12 +749,13 @@ tests += [
[]], []],
[['src/test/test-libudev.c'], [['src/test/test-libudev.c'],
[libshared], [libshared,
[]], libudev_static],
[],
'', '', [], libudev_includes],
[['src/test/test-udev.c'], [['src/test/test-udev.c'],
[libudev_core, [libudevd_core,
libudev_static,
libshared], libshared],
[threads, [threads,
librt, librt,
@ -1067,7 +1066,8 @@ tests += [
[libbasic, [libbasic,
libshared_static, libshared_static,
libudev], libudev],
[threads]], [threads],
'', '', [], libudev_includes],
[['src/libsystemd/sd-device/test-sd-device-monitor.c'], [['src/libsystemd/sd-device/test-sd-device-monitor.c'],
[], [],

View File

@ -16,7 +16,7 @@ udevadm_sources = files('''
udevd.c udevd.c
'''.split()) '''.split())
libudev_core_sources = ''' libudevd_core_sources = '''
udev-ctrl.c udev-ctrl.c
udev-ctrl.h udev-ctrl.h
udev-event.c udev-event.c
@ -42,17 +42,17 @@ libudev_core_sources = '''
'''.split() '''.split()
if conf.get('HAVE_KMOD') == 1 if conf.get('HAVE_KMOD') == 1
libudev_core_sources += ['udev-builtin-kmod.c'] libudevd_core_sources += ['udev-builtin-kmod.c']
endif endif
if conf.get('HAVE_BLKID') == 1 if conf.get('HAVE_BLKID') == 1
libudev_core_sources += ['udev-builtin-blkid.c'] libudevd_core_sources += ['udev-builtin-blkid.c']
endif endif
if conf.get('HAVE_ACL') == 1 if conf.get('HAVE_ACL') == 1
libudev_core_sources += ['udev-builtin-uaccess.c', libudevd_core_sources += ['udev-builtin-uaccess.c',
logind_acl_c, logind_acl_c,
sd_login_sources] sd_login_sources]
endif endif
############################################################ ############################################################
@ -105,15 +105,17 @@ else
udev_rpath = '' udev_rpath = ''
endif endif
libudev_includes = [includes, include_directories('../libudev')]
libudev_basic = static_library( libudev_basic = static_library(
'udev-basic', 'udev-basic',
libudev_sources, libudev_sources,
include_directories : includes, include_directories : libudev_includes,
c_args : ['-fvisibility=default']) c_args : ['-fvisibility=default'])
libudev_static = static_library( libudev_static = static_library(
'udev_static', 'udev_static',
include_directories : includes, include_directories : libudev_includes,
link_with : udev_link_with, link_with : udev_link_with,
link_whole : libudev_basic) link_whole : libudev_basic)
@ -126,7 +128,7 @@ install_libudev_static = static_library(
libsystemd_sources, libsystemd_sources,
libudev_sources, libudev_sources,
disable_mempool_c, disable_mempool_c,
include_directories : includes, include_directories : libudev_includes,
build_by_default : static_libudev != 'false', build_by_default : static_libudev != 'false',
install : static_libudev != 'false', install : static_libudev != 'false',
install_dir : rootlibdir, install_dir : rootlibdir,
@ -139,7 +141,7 @@ libudev = shared_library(
'udev', 'udev',
disable_mempool_c, disable_mempool_c,
version : libudev_version, version : libudev_version,
include_directories : includes, include_directories : libudev_includes,
link_args : ['-shared', link_args : ['-shared',
'-Wl,--version-script=' + libudev_sym_path], '-Wl,--version-script=' + libudev_sym_path],
link_with : [libsystemd_static, libshared_static], link_with : [libsystemd_static, libshared_static],
@ -149,13 +151,15 @@ libudev = shared_library(
install : true, install : true,
install_dir : rootlibdir) install_dir : rootlibdir)
libudev_core_includes = [includes, include_directories('net')] ############################################################
libudev_core = static_library(
libudevd_core_includes = [includes, include_directories('net')]
libudevd_core = static_library(
'udev-core', 'udev-core',
libudev_core_sources, libudevd_core_sources,
link_config_gperf_c, link_config_gperf_c,
keyboard_keys_from_name_h, keyboard_keys_from_name_h,
include_directories : libudev_core_includes, include_directories : libudevd_core_includes,
c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
link_with : udev_link_with, link_with : udev_link_with,
dependencies : [libblkid, libkmod]) dependencies : [libblkid, libkmod])
@ -179,7 +183,7 @@ foreach prog : [['ata_id/ata_id.c'],
include_directories : includes, include_directories : includes,
c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], c_args : ['-DLOG_REALM=LOG_REALM_UDEV'],
dependencies : [versiondep], dependencies : [versiondep],
link_with : [libudev_static], link_with : udev_link_with,
install_rpath : udev_rpath, install_rpath : udev_rpath,
install : true, install : true,
install_dir : udevlibexecdir) install_dir : udevlibexecdir)
@ -204,8 +208,7 @@ endif
fuzzers += [ fuzzers += [
[['src/udev/net/fuzz-link-parser.c', [['src/udev/net/fuzz-link-parser.c',
'src/fuzz/fuzz.h'], 'src/fuzz/fuzz.h'],
[libudev_core, [libudevd_core,
libudev_static,
libshared], libshared],
[threads, [threads,
libacl]], libacl]],