tree-wide: check if necessary cflags dependencies are set
This makes each `foo_cflags` dependency define a `SYSTEMD_CFLAGS_MARKER_FOO` macro, and checks if the macro is set when headers provided by external libraries are included. With this, we can fail fast at compile time if necessary `_cflags` dependencies are omitted in meson.build. Missing dependencies found by this mechanism have been added across the tree.
This commit is contained in:
+15
-8
@@ -174,14 +174,18 @@ libcore_static = static_library(
|
||||
include_directories : core_includes,
|
||||
implicit_include_directories : false,
|
||||
c_args : ['-fvisibility=default'],
|
||||
dependencies : [libaudit_cflags,
|
||||
libbpf_cflags,
|
||||
libcryptsetup_cflags,
|
||||
libm,
|
||||
libmount_cflags,
|
||||
libseccomp_cflags,
|
||||
libselinux_cflags,
|
||||
userspace],
|
||||
dependencies : [
|
||||
libacl_cflags,
|
||||
libaudit_cflags,
|
||||
libbpf_cflags,
|
||||
libcryptsetup_cflags,
|
||||
libm,
|
||||
libmount_cflags,
|
||||
libpcre2_cflags,
|
||||
libseccomp_cflags,
|
||||
libselinux_cflags,
|
||||
userspace,
|
||||
],
|
||||
build_by_default : false)
|
||||
|
||||
libcore = shared_library(
|
||||
@@ -210,6 +214,7 @@ core_libs_shared = [
|
||||
|
||||
systemd_deps = [
|
||||
libapparmor_cflags,
|
||||
libaudit_cflags,
|
||||
libkmod_cflags,
|
||||
libmount_cflags,
|
||||
libseccomp_cflags,
|
||||
@@ -226,6 +231,7 @@ if conf.get('SYSTEMD_MULTICALL_BINARY') == 1
|
||||
systemd_deps += [
|
||||
libbpf_cflags,
|
||||
libcryptsetup_cflags,
|
||||
libopenssl_cflags,
|
||||
libpam_cflags,
|
||||
]
|
||||
endif
|
||||
@@ -282,6 +288,7 @@ else
|
||||
libbpf_cflags,
|
||||
libcryptsetup_cflags,
|
||||
libmount_cflags,
|
||||
libopenssl_cflags,
|
||||
libpam_cflags,
|
||||
libseccomp_cflags,
|
||||
libselinux_cflags,
|
||||
|
||||
Reference in New Issue
Block a user