xref: /aosp_15_r20/external/sandboxed-api/sandboxed_api/sandbox2/examples/zlib/BUILD.bazel (revision ec63e07ab9515d95e79c211197c445ef84cefa6a)
1# Copyright 2019 Google LLC
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#     https://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
15load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
16
17package(default_visibility = [
18    "//sandboxed_api/sandbox2:__subpackages__",
19])
20
21licenses(["notice"])
22
23# Executor
24cc_binary(
25    name = "zpipe_sandbox",
26    srcs = ["zpipe_sandbox.cc"],
27    copts = sapi_platform_copts(),
28    data = [":zpipe"],
29    deps = [
30        "//sandboxed_api/sandbox2",
31        "//sandboxed_api/sandbox2/util:bpf_helper",
32        "//sandboxed_api/util:runfiles",
33        "@com_google_absl//absl/flags:flag",
34        "@com_google_absl//absl/flags:parse",
35        "@com_google_absl//absl/log",
36        "@com_google_absl//absl/log:check",
37        "@com_google_absl//absl/log:globals",
38        "@com_google_absl//absl/log:initialize",
39        "@com_google_absl//absl/strings:string_view",
40        "@com_google_absl//absl/time",
41    ],
42)
43
44# Sandboxee
45cc_binary(
46    name = "zpipe",
47    srcs = ["zpipe.c"],
48    copts = sapi_platform_copts(),
49    features = ["fully_static_link"],
50    deps = [
51        "@net_zlib//:zlib",
52    ],
53)
54