Skip to content

Commit 7c272b9

Browse files
authored
Merge branch 'master' into master
2 parents 9d2f2fe + c828a48 commit 7c272b9

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
CMakeCache.*
44
CMakeFiles/*
55
[Tt]esting/*
6+
cmake-build-debug
67
ebpf_code.h
78
vm-exten.btf
89
check
@@ -18,6 +19,7 @@ index.html*
1819
### VisualStudioCode ###
1920
.vscode/settings.json
2021
.vscode/runtime.json
22+
.idea
2123

2224
example/libffi/test
2325
test/man

cmake/StandardSettings.cmake

+4-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ endif()
7878
option(ENABLE_EBPF_VERIFIER "Whether to enable ebpf verifier" OFF)
7979

8080
# whether to build with bpftime daemon
81-
option(BUILD_BPFTIME_DAEMON "Whether to build the bpftime daemon" ON)
81+
option(BUILD_BPFTIME_DAEMON "Whether to build the bpftime daemon" ON)
82+
83+
# whether to build with shared bpf_map
84+
option(BPFTIME_BUILD_KERNEL_BPF "Whether to build with bpf share maps" ON)

cmake/frida.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ elseif(${FRIDA_OS_ARCH} MATCHES "linux-arm.*")
2626
set(FRIDA_GUM_DEVKIT_SHA256 "6b5963eb740062aec6c22c46ec2944a68006f72d290f714fb747ffe75b448a60")
2727
# Frida only has armhf builds..
2828
set(FRIDA_OS_ARCH "linux-armhf")
29+
elseif(${FRIDA_OS_ARCH} MATCHES "darwin-arm.*")
30+
set(FRIDA_CORE_DEVKIT_SHA256 "50aea2d5dfff000ed1f1dc1fdb2db67a02e4c4f44e782fa311f8afa31df327b6")
31+
set(FRIDA_GUM_DEVKIT_SHA256 "b40c08bebd6958d41d91b7819171a457448cccad5faf417c9b4901be54b6c633")
32+
# for macos-arm m* chip series
33+
set(FRIDA_OS_ARCH "macos-arm64e")
2934
else()
3035
message(FATAL_ERROR "Unsupported frida arch ${FRIDA_OS_ARCH}")
3136
endif()

runtime/CMakeLists.txt

+12-8
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,25 @@ set(sources
7171
src/bpf_map/userspace/per_cpu_array_map.cpp
7272
src/bpf_map/userspace/per_cpu_hash_map.cpp
7373
src/bpf_map/userspace/prog_array.cpp
74-
75-
src/bpf_map/shared/array_map_kernel_user.cpp
76-
src/bpf_map/shared/hash_map_kernel_user.cpp
77-
src/bpf_map/shared/percpu_array_map_kernel_user.cpp
78-
src/bpf_map/shared/perf_event_array_kernel_user.cpp
79-
8074
extension/extension_helper.cpp
8175
)
8276

77+
if(BPFTIME_BUILD_KERNEL_BPF)
78+
list(APPEND sources
79+
src/bpf_map/shared/array_map_kernel_user.cpp
80+
src/bpf_map/shared/hash_map_kernel_user.cpp
81+
src/bpf_map/shared/percpu_array_map_kernel_user.cpp
82+
src/bpf_map/shared/perf_event_array_kernel_user.cpp
83+
)
84+
endif()
85+
86+
8387
set(headers
8488
include/
8589
)
86-
message(INFO "Headers: ${headers}")
90+
message(INFO " Headers: ${headers}")
8791

88-
message(INFO "Found the following sources: ${sources}")
92+
message(INFO " Found the following sources: ${sources}")
8993

9094
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
9195
add_definitions(-DSPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG)

0 commit comments

Comments
 (0)