]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson, bpf: add build rule for socket-bind program
authorJulia Kartseva <hex@fb.com>
Tue, 20 Apr 2021 06:30:08 +0000 (23:30 -0700)
committerJulia Kartseva <hex@fb.com>
Mon, 26 Apr 2021 23:21:59 +0000 (16:21 -0700)
src/core/bpf/socket_bind/meson.build [new file with mode: 0644]
src/core/meson.build

diff --git a/src/core/bpf/socket_bind/meson.build b/src/core/bpf/socket_bind/meson.build
new file mode 100644 (file)
index 0000000..0ea8e57
--- /dev/null
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1+
+
+if conf.get('BPF_FRAMEWORK') == 1
+        socket_bind_skel_h = custom_target(
+                'socket-bind.skel.h',
+                input : 'socket-bind.bpf.c',
+                output : 'socket-bind.skel.h',
+                command : [build_bpf_skel_py,
+                           '--clang_exec', clang.path(),
+                           '--llvm_strip_exec', llvm_strip.path(),
+                           '--bpftool_exec', bpftool.path(),
+                           '--arch', host_machine.cpu_family(),
+                           '@INPUT@', '@OUTPUT@'])
+endif
index a1294f3a7251cc3ebc80cc34ee81b6d7bffad4f0..f8027333a9ecb5198b467677e9e3045288270461 100644 (file)
@@ -123,6 +123,11 @@ libcore_sources = '''
         unit.h
 '''.split()
 
+subdir('bpf/socket_bind')
+if conf.get('BPF_FRAMEWORK') == 1
+        libcore_sources += [socket_bind_skel_h]
+endif
+
 load_fragment_gperf_gperf = custom_target(
         'load-fragment-gperf.gperf',
         input : 'load-fragment-gperf.gperf.m4',