Skip to content

Commit

Permalink
aot: Fix distro builds
Browse files Browse the repository at this point in the history
We need to link aot.o against libelf if aot.cpp wants to actually use
the dependency.
  • Loading branch information
danobi committed May 27, 2024
1 parent d44a6bf commit 12e43c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/aot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ target_include_directories(aot PUBLIC ${CMAKE_BINARY_DIR}/src)
target_include_directories(aot PUBLIC ${CMAKE_BINARY_DIR})
target_compile_definitions(aot PRIVATE ${BPFTRACE_FLAGS})

if(STATIC_LINKING)
target_link_libraries(aot LIBELF)
else()
target_link_libraries(aot ${LIBELF_LIBRARIES})
endif(STATIC_LINKING)

# Only build aotrt if supported bcc is used
# (https://github.com/iovisor/bcc/commit/719191867a25ce07dc96f7faf9b8ccedadc7ec44)
if(NOT LIBBCC_BPF_CONTAINS_RUNTIME)
Expand Down

0 comments on commit 12e43c5

Please sign in to comment.