mirror of
https://github.com/netdata/netdata.git
synced 2025-04-06 22:38:55 +00:00
Link the ebpf plugin against libbpf directly instead of through libnetdata. (#19514)
This commit is contained in:
parent
955b174259
commit
7e6e3bbaf7
3 changed files with 2 additions and 9 deletions
|
@ -2156,11 +2156,6 @@ if(OS_WINDOWS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# ebpf
|
||||
if(ENABLE_PLUGIN_EBPF)
|
||||
netdata_add_libbpf_to_target(libnetdata)
|
||||
endif()
|
||||
|
||||
# judy
|
||||
target_link_libraries(libnetdata PUBLIC judy)
|
||||
|
||||
|
@ -2657,6 +2652,7 @@ if(ENABLE_PLUGIN_EBPF)
|
|||
add_executable(ebpf.plugin ${EBPF_PLUGIN_FILES})
|
||||
target_link_libraries(ebpf.plugin libnetdata)
|
||||
|
||||
netdata_add_libbpf_to_target(ebpf.plugin)
|
||||
netdata_add_ebpf_co_re_to_target(ebpf.plugin)
|
||||
|
||||
install(TARGETS ebpf.plugin
|
||||
|
|
|
@ -93,7 +93,7 @@ endfunction()
|
|||
|
||||
# Add libbpf as a link dependency for the given target.
|
||||
function(netdata_add_libbpf_to_target _target)
|
||||
target_link_libraries(${_target} PUBLIC libbpf_library)
|
||||
target_link_libraries(${_target} libbpf_library)
|
||||
target_include_directories(${_target} BEFORE PUBLIC "${NETDATA_LIBBPF_INCLUDE_DIRECTORIES}")
|
||||
target_compile_options(${_target} PUBLIC "${NETDATA_LIBBPF_COMPILE_OPTIONS}")
|
||||
add_dependencies(${_target} libbpf)
|
||||
|
|
|
@ -125,9 +125,6 @@ extern const char *netdata_configured_host_prefix;
|
|||
|
||||
#include "log/systemd-journal-helpers.h"
|
||||
|
||||
#if defined(HAVE_LIBBPF) && !defined(__cplusplus)
|
||||
#include "ebpf/ebpf.h"
|
||||
#endif
|
||||
#include "eval/eval.h"
|
||||
#include "statistical/statistical.h"
|
||||
#include "adaptive_resortable_list/adaptive_resortable_list.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue