mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Break out executor into its own build target
PiperOrigin-RevId: 257147090 Change-Id: I34c5e86ca68f865fdae42e4077c52c6168672c06
This commit is contained in:
parent
747ccb57e8
commit
6d06df1b86
|
@ -251,12 +251,32 @@ cc_library(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "executor",
|
||||||
|
srcs = ["executor.cc"],
|
||||||
|
hdrs = ["executor.h"],
|
||||||
|
copts = sapi_platform_copts(),
|
||||||
|
deps = [
|
||||||
|
":forkserver",
|
||||||
|
":forkserver_proto",
|
||||||
|
":global_forkserver",
|
||||||
|
":ipc",
|
||||||
|
":limits",
|
||||||
|
":namespace",
|
||||||
|
":util",
|
||||||
|
"//sandboxed_api/sandbox2/util:fileops",
|
||||||
|
"@com_google_absl//absl/base:core_headers",
|
||||||
|
"@com_google_absl//absl/memory",
|
||||||
|
"@com_google_absl//absl/strings",
|
||||||
|
"@org_kernel_libcap//:libcap",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
# Should not be used in sandboxee code if it only uses sandbox2::Comms and
|
# Should not be used in sandboxee code if it only uses sandbox2::Comms and
|
||||||
# sandbox2::Client objects
|
# sandbox2::Client objects
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "sandbox2",
|
name = "sandbox2",
|
||||||
srcs = [
|
srcs = [
|
||||||
"executor.cc",
|
|
||||||
"monitor.cc",
|
"monitor.cc",
|
||||||
"monitor.h",
|
"monitor.h",
|
||||||
"policybuilder.cc",
|
"policybuilder.cc",
|
||||||
|
@ -264,24 +284,24 @@ cc_library(
|
||||||
"stack_trace.cc",
|
"stack_trace.cc",
|
||||||
],
|
],
|
||||||
hdrs = [
|
hdrs = [
|
||||||
|
"client.h",
|
||||||
"executor.h",
|
"executor.h",
|
||||||
"policybuilder.h",
|
|
||||||
"sandbox2.h",
|
|
||||||
"stack_trace.h",
|
|
||||||
# Workaround: reexporting the header files of our dependencies, see b/15420638
|
|
||||||
"ipc.h",
|
"ipc.h",
|
||||||
"limits.h",
|
"limits.h",
|
||||||
"notify.h",
|
"notify.h",
|
||||||
"policy.h",
|
"policy.h",
|
||||||
|
"policybuilder.h",
|
||||||
"regs.h",
|
"regs.h",
|
||||||
"result.h",
|
"result.h",
|
||||||
|
"sandbox2.h",
|
||||||
|
"stack_trace.h",
|
||||||
"syscall.h",
|
"syscall.h",
|
||||||
"client.h",
|
|
||||||
],
|
],
|
||||||
copts = sapi_platform_copts(),
|
copts = sapi_platform_copts(),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
":client",
|
":client",
|
||||||
|
":executor",
|
||||||
":comms",
|
":comms",
|
||||||
":violation_proto_cc",
|
":violation_proto_cc",
|
||||||
":forkserver",
|
":forkserver",
|
||||||
|
|
|
@ -268,10 +268,31 @@ target_link_libraries(sandbox2_global_forkserver PRIVATE
|
||||||
sapi::raw_logging
|
sapi::raw_logging
|
||||||
)
|
)
|
||||||
|
|
||||||
# sandboxed_api/sandbox2:sandbox2
|
# sandboxed_api/sandbox2:executor
|
||||||
add_library(sandbox2_sandbox2 STATIC
|
add_library(sandbox2_executor STATIC
|
||||||
executor.cc
|
executor.cc
|
||||||
executor.h
|
executor.h
|
||||||
|
)
|
||||||
|
add_library(sandbox2::executor ALIAS sandbox2_executor)
|
||||||
|
target_link_libraries(sandbox2_executor PRIVATE
|
||||||
|
absl::core_headers
|
||||||
|
absl::memory
|
||||||
|
absl::strings
|
||||||
|
glog::glog
|
||||||
|
libcap::libcap
|
||||||
|
sandbox2::fileops
|
||||||
|
sandbox2::forkserver
|
||||||
|
sandbox2::forkserver_proto
|
||||||
|
sandbox2::global_forkserver
|
||||||
|
sandbox2::ipc
|
||||||
|
sandbox2::limits
|
||||||
|
sandbox2::namespace
|
||||||
|
sandbox2::util
|
||||||
|
sapi::base
|
||||||
|
)
|
||||||
|
|
||||||
|
# sandboxed_api/sandbox2:sandbox2
|
||||||
|
add_library(sandbox2_sandbox2 STATIC
|
||||||
monitor.cc
|
monitor.cc
|
||||||
monitor.h
|
monitor.h
|
||||||
policybuilder.cc
|
policybuilder.cc
|
||||||
|
@ -296,6 +317,7 @@ target_link_libraries(sandbox2_sandbox2
|
||||||
sandbox2::bpf_helper
|
sandbox2::bpf_helper
|
||||||
sandbox2::client
|
sandbox2::client
|
||||||
sandbox2::comms
|
sandbox2::comms
|
||||||
|
sandbox2::executor
|
||||||
sandbox2::file_base
|
sandbox2::file_base
|
||||||
sandbox2::fileops
|
sandbox2::fileops
|
||||||
sandbox2::forkserver
|
sandbox2::forkserver
|
||||||
|
|
Loading…
Reference in New Issue
Block a user