Skip to content

Commit

Permalink
in_ebpf: core: Prepare eBPF skeletons before starting to compile prop…
Browse files Browse the repository at this point in the history
…erly

Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Jan 21, 2025
1 parent e7fc139 commit 58026b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/in_ebpf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ foreach(TRACE_C_FILE ${TRACE_C_FILES})
endforeach()

# Create a custom target specifically for generating eBPF skeletons
add_custom_target(generate_skeletons DEPENDS ${TRACE_SKEL_HEADERS})
add_custom_target(flb-ebpf-generate_skeletons DEPENDS ${TRACE_SKEL_HEADERS})

# Create a custom target to compile all eBPF programs (all trace bpf.c files)
add_custom_target(compile_ebpf ALL DEPENDS ${TRACE_OBJ_FILES} ${TRACE_SKEL_HEADERS})
Expand Down
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ if(FLB_BINARY)
add_dependencies(fluent-bit-bin flb-static-conf)
endif()

# in_ebpf
if(FLB_IN_EBPF)
add_dependencies(fluent-bit-bin flb-ebpf-generate_skeletons)
endif()

if(FLB_REGEX)
target_link_libraries(fluent-bit-bin onigmo-static)
endif()
Expand Down

0 comments on commit 58026b2

Please sign in to comment.