• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2024 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19// NOTE: This is intended to build both inside and outside the Android
20// environment. When adding dependencies, ensure that they are in the
21// intersection of available libraries in all environments.
22
23cc_binary_host {
24    name: "process_sandboxer",
25    defaults: ["cuttlefish_buildhost_only"],
26    srcs: [
27        "credentialed_unix_server.cpp",
28        "logs.cpp",
29        "main.cpp",
30        "pidfd.cpp",
31        "policies.cpp",
32        "policies/adb_connector.cpp",
33        "policies/assemble_cvd.cpp",
34        "policies/avbtool.cpp",
35        "policies/baseline.cpp",
36        "policies/casimir.cpp",
37        "policies/casimir_control_server.cpp",
38        "policies/cf_vhost_user_input.cpp",
39        "policies/control_env_proxy_server.cpp",
40        "policies/cvd_internal_start.cpp",
41        "policies/echo_server.cpp",
42        "policies/gnss_grpc_proxy.cpp",
43        "policies/kernel_log_monitor.cpp",
44        "policies/log_tee.cpp",
45        "policies/logcat_receiver.cpp",
46        "policies/metrics.cpp",
47        "policies/mkenvimage_slim.cpp",
48        "policies/modem_simulator.cpp",
49        "policies/netsimd.cpp",
50        "policies/newfs_msdos.cpp",
51        "policies/no_policy.cpp",
52        "policies/openwrt_control_server.cpp",
53        "policies/operator_proxy.cpp",
54        "policies/process_restarter.cpp",
55        "policies/run_cvd.cpp",
56        "policies/screen_recording_server.cpp",
57        "policies/secure_env.cpp",
58        "policies/simg2img.cpp",
59        "policies/socket_vsock_proxy.cpp",
60        "policies/tcp_connector.cpp",
61        "policies/tombstone_receiver.cpp",
62        "policies/vhost_device_vsock.cpp",
63        "policies/webrtc.cpp",
64        "policies/webrtc_operator.cpp",
65        "policies/wmediumd.cpp",
66        "policies/wmediumd_gen_config.cpp",
67        "poll_callback.cpp",
68        "sandbox_manager.cpp",
69        "signal_fd.cpp",
70    ],
71    shared_libs: ["sandboxed_api_sandbox2"],
72    static_libs: [
73        "libabsl_host",
74        "libcap",
75        "libprocess_sandboxer_proxy_common",
76    ],
77    target: {
78        darwin: {
79            enabled: false,
80        },
81        windows: {
82            enabled: false,
83        },
84    },
85}
86
87cc_library_static {
88    name: "libprocess_sandboxer_proxy_common",
89    defaults: ["cuttlefish_buildhost_only"],
90    srcs: ["proxy_common.cpp"],
91    static_libs: ["libabsl_host"],
92    target: {
93        darwin: {
94            enabled: false,
95        },
96        windows: {
97            enabled: false,
98        },
99    },
100}
101
102cc_binary_host {
103    name: "sandboxer_proxy",
104    defaults: ["cuttlefish_buildhost_only"],
105    srcs: [
106        "sandboxer_proxy.cpp",
107    ],
108    static_libs: [
109        "libabsl_host",
110        "libprocess_sandboxer_proxy_common",
111    ],
112    target: {
113        darwin: {
114            enabled: false,
115        },
116        windows: {
117            enabled: false,
118        },
119    },
120}
121