Merge pull request #120 from jordalgo/c-headers

Include libbpf_h path in c sched compilation
This commit is contained in:
Tejun Heo 2024-02-02 17:22:15 -10:00 committed by GitHub
commit 4631392031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,12 +88,20 @@ bpf_base_cflags = ['-g', '-O2', '-Wall', '-Wno-compare-distinct-pointer-types',
message('cpu=@0@ bpf_base_cflags=@1@'.format(cpu, bpf_base_cflags))
libbpf_c_headers = []
if get_option('libbpf_a') != ''
foreach header: get_option('libbpf_h')
libbpf_c_headers += ['-I', header]
endforeach
endif
#
# Generators to build BPF skel file for C schedulers.
#
gen_bpf_o = generator(bpf_clang,
output: '@BASENAME@.o',
arguments: [bpf_base_cflags, '-target', 'bpf', '@EXTRA_ARGS@',
arguments: [bpf_base_cflags, '-target', 'bpf', libbpf_c_headers, '@EXTRA_ARGS@',
'-c', '@INPUT@', '-o', '@OUTPUT@'])
gen_bpf_skel = generator(bpftool_build_skel,
output: ['@BASENAME@.skel.h', '@BASENAME@.subskel.h' ],