diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-12-14 12:41:32 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-12-15 18:31:44 +0100 |
commit | e4b127e2cc51fa23819b06f5586cdcd3ac776fd1 (patch) | |
tree | 38f9227cf51f9bf79480e3916676a66aa8c24bf7 | |
parent | udev: drop unnecessary libudev-util.h inclusions (diff) | |
download | systemd-e4b127e2cc51fa23819b06f5586cdcd3ac776fd1.tar.xz systemd-e4b127e2cc51fa23819b06f5586cdcd3ac776fd1.zip |
meson: do not link with libudev
-rw-r--r-- | meson.build | 11 | ||||
-rw-r--r-- | src/fuzz/meson.build | 3 | ||||
-rw-r--r-- | src/network/meson.build | 10 | ||||
-rw-r--r-- | src/shared/meson.build | 1 | ||||
-rw-r--r-- | src/test/meson.build | 18 | ||||
-rw-r--r-- | src/udev/meson.build | 37 |
6 files changed, 36 insertions, 44 deletions
diff --git a/meson.build b/meson.build index e0a3c53529..82c6de900c 100644 --- a/meson.build +++ b/meson.build @@ -1577,7 +1577,6 @@ includes = include_directories('src/basic', 'src/libsystemd/sd-netlink', 'src/libsystemd/sd-network', 'src/libsystemd/sd-resolve', - 'src/libudev', 'src/login', 'src/nspawn', 'src/resolve', @@ -3162,7 +3161,7 @@ if conf.get('ENABLE_HWDB') == 1 'src/hwdb/hwdb.c', 'src/libsystemd/sd-hwdb/hwdb-internal.h', include_directories : includes, - link_with : [libudev_static], + link_with : udev_link_with, install_rpath : udev_rpath, install : true, install_dir : rootbindir) @@ -3194,8 +3193,7 @@ public_programs += executable( udevadm_sources, c_args : '-DLOG_REALM=LOG_REALM_UDEV', include_directories : includes, - link_with : [libudev_core, - libudev_static], + link_with : [libudevd_core], dependencies : [versiondep, threads, libkmod, @@ -3274,7 +3272,6 @@ if conf.get('ENABLE_NETWORKD') == 1 include_directories : network_include_dir, link_with : [libnetworkd_core, libsystemd_network, - libudev_static, networkd_link_with], dependencies : [threads], install_rpath : rootlibexecdir, @@ -3412,7 +3409,7 @@ endif exe = executable( 'test-libudev-sym', test_libudev_sym_c, - include_directories : includes, + include_directories : libudev_includes, c_args : '-Wno-deprecated-declarations', link_with : [libudev], build_by_default : want_tests != 'false', @@ -3425,7 +3422,7 @@ endif exe = executable( 'test-libudev-static-sym', test_libudev_sym_c, - include_directories : includes, + include_directories : libudev_includes, c_args : '-Wno-deprecated-declarations', link_with : [install_libudev_static], build_by_default : want_tests != 'false' and static_libudev_pic, diff --git a/src/fuzz/meson.build b/src/fuzz/meson.build index f8f0c386b3..80fa0f6fcc 100644 --- a/src/fuzz/meson.build +++ b/src/fuzz/meson.build @@ -106,8 +106,7 @@ fuzzers += [ []], [['src/fuzz/fuzz-udev-rules.c'], - [libudev_core, - libudev_static, + [libudevd_core, libshared], [threads, libacl]], diff --git a/src/network/meson.build b/src/network/meson.build index 4123873c60..805007782c 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -244,7 +244,6 @@ if conf.get('ENABLE_NETWORKD') == 1 [['src/network/fuzz-netdev-parser.c', 'src/fuzz/fuzz.h'], [libnetworkd_core, - libudev_static, libsystemd_network, networkd_link_with], [threads], @@ -254,7 +253,6 @@ if conf.get('ENABLE_NETWORKD') == 1 [['src/network/fuzz-network-parser.c', 'src/fuzz/fuzz.h'], [libnetworkd_core, - libudev_static, libsystemd_network, networkd_link_with], [threads], @@ -265,13 +263,11 @@ if conf.get('ENABLE_NETWORKD') == 1 tests += [ [['src/network/test-networkd-conf.c'], [libnetworkd_core, - libsystemd_network, - libudev], + libsystemd_network], [], '', '', [], network_include_dir], [['src/network/test-network.c'], [libnetworkd_core, - libudev_static, libsystemd_network, networkd_link_with], [threads], @@ -279,14 +275,12 @@ if conf.get('ENABLE_NETWORKD') == 1 [['src/network/test-routing-policy-rule.c'], [libnetworkd_core, - libsystemd_network, - libudev], + libsystemd_network], [], '', '', [], network_include_dir], [['src/network/test-network-tables.c', test_tables_h], [libnetworkd_core, - libudev_static, libsystemd_network, networkd_link_with], [threads], diff --git a/src/shared/meson.build b/src/shared/meson.build index cc9501f5b2..b43fe9c6d9 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -383,7 +383,6 @@ libshared_static = static_library( libshared = shared_library( libshared_name, - libudev_sources, include_directories : includes, link_args : ['-shared', '-Wl,--version-script=' + libshared_sym_path], diff --git a/src/test/meson.build b/src/test/meson.build index 3afe5d58cb..0cfc709f44 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -52,7 +52,6 @@ tests += [ [['src/test/test-engine.c'], [libcore, - libudev, libshared], [threads, librt, @@ -520,8 +519,7 @@ tests += [ 'src/journal/journald-server.h'], [libcore, libjournal_core, - libudev_core, - libudev_static, + libudevd_core, libshared], [threads, libseccomp, @@ -529,7 +527,7 @@ tests += [ libxz, liblz4, libblkid], - '', '', [], libudev_core_includes], + '', '', [], libudevd_core_includes], [['src/test/test-prioq.c'], [], @@ -751,12 +749,13 @@ tests += [ []], [['src/test/test-libudev.c'], - [libshared], - []], + [libshared, + libudev_static], + [], + '', '', [], libudev_includes], [['src/test/test-udev.c'], - [libudev_core, - libudev_static, + [libudevd_core, libshared], [threads, librt, @@ -1067,7 +1066,8 @@ tests += [ [libbasic, libshared_static, libudev], - [threads]], + [threads], + '', '', [], libudev_includes], [['src/libsystemd/sd-device/test-sd-device-monitor.c'], [], diff --git a/src/udev/meson.build b/src/udev/meson.build index d67b459388..9170b58a8a 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -16,7 +16,7 @@ udevadm_sources = files(''' udevd.c '''.split()) -libudev_core_sources = ''' +libudevd_core_sources = ''' udev-ctrl.c udev-ctrl.h udev-event.c @@ -42,17 +42,17 @@ libudev_core_sources = ''' '''.split() if conf.get('HAVE_KMOD') == 1 - libudev_core_sources += ['udev-builtin-kmod.c'] + libudevd_core_sources += ['udev-builtin-kmod.c'] endif if conf.get('HAVE_BLKID') == 1 - libudev_core_sources += ['udev-builtin-blkid.c'] + libudevd_core_sources += ['udev-builtin-blkid.c'] endif if conf.get('HAVE_ACL') == 1 - libudev_core_sources += ['udev-builtin-uaccess.c', - logind_acl_c, - sd_login_sources] + libudevd_core_sources += ['udev-builtin-uaccess.c', + logind_acl_c, + sd_login_sources] endif ############################################################ @@ -105,15 +105,17 @@ else udev_rpath = '' endif +libudev_includes = [includes, include_directories('../libudev')] + libudev_basic = static_library( 'udev-basic', libudev_sources, - include_directories : includes, + include_directories : libudev_includes, c_args : ['-fvisibility=default']) libudev_static = static_library( 'udev_static', - include_directories : includes, + include_directories : libudev_includes, link_with : udev_link_with, link_whole : libudev_basic) @@ -126,7 +128,7 @@ install_libudev_static = static_library( libsystemd_sources, libudev_sources, disable_mempool_c, - include_directories : includes, + include_directories : libudev_includes, build_by_default : static_libudev != 'false', install : static_libudev != 'false', install_dir : rootlibdir, @@ -139,7 +141,7 @@ libudev = shared_library( 'udev', disable_mempool_c, version : libudev_version, - include_directories : includes, + include_directories : libudev_includes, link_args : ['-shared', '-Wl,--version-script=' + libudev_sym_path], link_with : [libsystemd_static, libshared_static], @@ -149,13 +151,15 @@ libudev = shared_library( install : true, 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', - libudev_core_sources, + libudevd_core_sources, link_config_gperf_c, keyboard_keys_from_name_h, - include_directories : libudev_core_includes, + include_directories : libudevd_core_includes, c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], link_with : udev_link_with, dependencies : [libblkid, libkmod]) @@ -179,7 +183,7 @@ foreach prog : [['ata_id/ata_id.c'], include_directories : includes, c_args : ['-DLOG_REALM=LOG_REALM_UDEV'], dependencies : [versiondep], - link_with : [libudev_static], + link_with : udev_link_with, install_rpath : udev_rpath, install : true, install_dir : udevlibexecdir) @@ -204,8 +208,7 @@ endif fuzzers += [ [['src/udev/net/fuzz-link-parser.c', 'src/fuzz/fuzz.h'], - [libudev_core, - libudev_static, + [libudevd_core, libshared], [threads, libacl]], |