// Copyright (C) 2024 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } // NOTE: This is intended to build both inside and outside the Android // environment. When adding dependencies, ensure that they are in the // intersection of available libraries in all environments. cc_binary_host { name: "process_sandboxer", defaults: ["cuttlefish_buildhost_only"], srcs: [ "credentialed_unix_server.cpp", "filesystem.cpp", "logs.cpp", "main.cpp", "pidfd.cpp", "policies.cpp", "policies/adb_connector.cpp", "policies/assemble_cvd.cpp", "policies/avbtool.cpp", "policies/baseline.cpp", "policies/casimir.cpp", "policies/casimir_control_server.cpp", "policies/control_env_proxy_server.cpp", "policies/cvd_internal_start.cpp", "policies/echo_server.cpp", "policies/gnss_grpc_proxy.cpp", "policies/kernel_log_monitor.cpp", "policies/log_tee.cpp", "policies/logcat_receiver.cpp", "policies/metrics.cpp", "policies/mkenvimage_slim.cpp", "policies/modem_simulator.cpp", "policies/netsimd.cpp", "policies/newfs_msdos.cpp", "policies/no_policy.cpp", "policies/openwrt_control_server.cpp", "policies/operator_proxy.cpp", "policies/process_restarter.cpp", "policies/run_cvd.cpp", "policies/screen_recording_server.cpp", "policies/secure_env.cpp", "policies/simg2img.cpp", "policies/socket_vsock_proxy.cpp", "policies/tcp_connector.cpp", "policies/tombstone_receiver.cpp", "policies/vhost_device_vsock.cpp", "policies/webrtc.cpp", "policies/webrtc_operator.cpp", "policies/wmediumd.cpp", "policies/wmediumd_gen_config.cpp", "poll_callback.cpp", "sandbox_manager.cpp", "signal_fd.cpp", "unique_fd.cpp", ], shared_libs: ["sandboxed_api_sandbox2"], static_libs: [ "libabsl_host", "libcap", "libprocess_sandboxer_proxy_common", ], target: { darwin: { enabled: false, }, windows: { enabled: false, }, }, } cc_library_static { name: "libprocess_sandboxer_proxy_common", defaults: ["cuttlefish_buildhost_only"], srcs: ["proxy_common.cpp"], static_libs: ["libabsl_host"], target: { darwin: { enabled: false, }, windows: { enabled: false, }, }, } cc_binary_host { name: "sandboxer_proxy", defaults: ["cuttlefish_buildhost_only"], srcs: [ "sandboxer_proxy.cpp", ], static_libs: [ "libabsl_host", "libprocess_sandboxer_proxy_common", ], target: { darwin: { enabled: false, }, windows: { enabled: false, }, }, }