Skip to content

Commit

Permalink
Revert "Stop linking against bcc-loader-static"
Browse files Browse the repository at this point in the history
This reverts commit 5fbb7a7.
  • Loading branch information
ajor authored and danobi committed Mar 18, 2019
1 parent ce05910 commit 5b6352c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cmake/FindLibBcc.cmake
Expand Up @@ -6,6 +6,7 @@
# LIBBCC_LIBRARIES - Link these to use libbcc
# LIBBCC_DEFINITIONS - Compiler switches required for using libbcc
# LIBBPF_LIBRARY_STATIC - libbpf static library (for static compilation)
# LIBBCC_LOADER_LIBRARY_STATIC - libbcc helper static library (for static compilation)

if (LIBBCC_LIBRARIES AND LIBBCC_INCLUDE_DIRS)
set (LibBcc_FIND_QUIETLY TRUE)
Expand Down Expand Up @@ -48,6 +49,17 @@ find_library (LIBBPF_LIBRARY_STATIC
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH)

find_library (LIBBCC_LOADER_LIBRARY_STATIC
NAMES
bcc-loader-static
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
ENV LIBRARY_PATH
ENV LD_LIBRARY_PATH)

include (FindPackageHandleStandardArgs)


Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Expand Up @@ -32,6 +32,7 @@ target_link_libraries(bpftrace arch ast parser resources)
if (STATIC_LINKING)
target_link_libraries(bpftrace ${LIBBCC_LIBRARIES})
target_link_libraries(bpftrace ${LIBBPF_LIBRARY_STATIC})
target_link_libraries(bpftrace ${LIBBCC_LOADER_LIBRARY_STATIC})
else()
target_link_libraries(bpftrace ${LIBBCC_LIBRARIES})
endif()
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Expand Up @@ -44,6 +44,7 @@ target_link_libraries(bpftrace_test arch ast parser resources)
if (STATIC_LINKING)
target_link_libraries(bpftrace_test ${LIBBCC_LIBRARIES})
target_link_libraries(bpftrace_test ${LIBBPF_LIBRARY_STATIC})
target_link_libraries(bpftrace_test ${LIBBCC_LOADER_LIBRARY_STATIC})
else()
target_link_libraries(bpftrace_test ${LIBBCC_LIBRARIES})
endif()
Expand Down

0 comments on commit 5b6352c

Please sign in to comment.