Skip to content

Commit a23c881

Browse files
committed
hp77 | add libubpf to condition and add target in makefile
1 parent cc0a4e5 commit a23c881

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ if(${BPFTIME_LLVM_JIT})
150150
bpftime_add_static_lib_component_command(bpftime_llvm_jit_vm)
151151
else()
152152
bpftime_add_static_lib_component_command(bpftime_ubpf_vm)
153+
bpftime_add_libs_component_command(${UBPF_BUILD_DIR}/lib/libubpf.a)
153154
endif()
154155
bpftime_add_libs_component_command(${FRIDA_GUM_INSTALL_DIR}/libfrida-gum.a)
155156
bpftime_add_static_lib_component_command(bpftime_frida_uprobe_attach_impl)
156157
bpftime_add_static_lib_component_command(bpftime_syscall_trace_attach_impl)
157-
bpftime_add_libs_component_command(${UBPF_BUILD_DIR}/lib/libubpf.a)
158158
bpftime_add_static_lib_component_command(runtime)
159159
bpftime_add_static_lib_component_command(spdlog)
160160
if(CMAKE_AR_NAME STREQUAL "libtool")

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ release-with-llvm-jit: ## build the package, with llvm-jit
6464
-DBPFTIME_LLVM_JIT=1
6565
cmake --build build --config RelWithDebInfo --target install -j$(JOBS)
6666

67+
release-with-static-lib: ## build the release version with libbpftime archive
68+
cmake -Bbuild -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
69+
-DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_INFO -DBPTIME_BULD_STATIC=ON
70+
cmake --build build --config RelWithDebInfo --target install -j$(JOBS)
71+
6772
build-vm: ## build only the core library
6873
make -C vm build
6974

0 commit comments

Comments
 (0)