aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrendan Gregg <brendan.d.gregg@gmail.com>2018-07-22 21:06:28 -0700
committeryonghong-song <ys114321@gmail.com>2018-07-22 21:06:28 -0700
commit5148fcec9eb93d29949b04ccdfe9b6e6edc6362d (patch)
tree3a739349c2e2033b735926d6ea0eab914a4ea8d0 /src
parent3d9b687dce246a54686bc385e28d190b6d640af0 (diff)
downloadbcc-5148fcec9eb93d29949b04ccdfe9b6e6edc6362d.tar.gz
add usdt calls to libbcc (#1890)
add usdt calls to libbcc static library
Diffstat (limited to 'src')
-rw-r--r--src/cc/CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
index 8ddfd8f5..fda165d0 100644
--- a/src/cc/CMakeLists.txt
+++ b/src/cc/CMakeLists.txt
@@ -47,10 +47,15 @@ add_library(bcc-shared SHARED
set_target_properties(bcc-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0)
set_target_properties(bcc-shared PROPERTIES OUTPUT_NAME bcc)
+if(ENABLE_USDT)
+ set(bcc_usdt_sources usdt/usdt.cc usdt/usdt_args.cc)
+ # else undefined
+endif()
+
add_library(bcc-loader-static STATIC ${bcc_sym_sources} ${bcc_util_sources})
target_link_libraries(bcc-loader-static elf)
add_library(bcc-static STATIC
- ${bcc_common_sources} ${bcc_table_sources} ${bcc_util_sources})
+ ${bcc_common_sources} ${bcc_table_sources} ${bcc_util_sources} ${bcc_usdt_sources})
set_target_properties(bcc-static PROPERTIES OUTPUT_NAME bcc)
set(bcc-lua-static
${bcc_common_sources} ${bcc_table_sources} ${bcc_sym_sources} ${bcc_util_sources})
@@ -76,6 +81,7 @@ if(ENABLE_CPP_API)
endif()
if(ENABLE_USDT)
+ list(APPEND bcc_api_headers bcc_usdt.h)
add_subdirectory(usdt)
list(APPEND bcc_common_libs_for_a usdt-static)
list(APPEND bcc_common_libs_for_s usdt-static)