mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
4d906e7143
PiperOrigin-RevId: 461617454 Change-Id: Id77bfbec2cc095005a434251c056b19c3c6a64c4
104 lines
2.8 KiB
Python
104 lines
2.8 KiB
Python
# Copyright 2019 Google LLC
|
|
#
|
|
# 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
|
|
#
|
|
# https://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.
|
|
|
|
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
|
|
|
|
_DEFAULT_VISIBILITY = [
|
|
"//security/bedebox:__subpackages__",
|
|
"//sandboxed_api:__subpackages__",
|
|
]
|
|
|
|
package(default_visibility = _DEFAULT_VISIBILITY)
|
|
|
|
package_group(
|
|
name = "minielf_users",
|
|
packages = [
|
|
"//buzz/diffractor/sandbox/...", # mbonadei@ and ossu@ (alternatively rtc-diffractor-eng@)
|
|
],
|
|
)
|
|
|
|
licenses(["notice"])
|
|
|
|
cc_library(
|
|
name = "bpf_helper",
|
|
srcs = ["bpf_helper.c"],
|
|
hdrs = ["bpf_helper.h"],
|
|
copts = sapi_platform_copts([
|
|
]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "minielf",
|
|
srcs = ["minielf.cc"],
|
|
hdrs = ["minielf.h"],
|
|
copts = sapi_platform_copts(),
|
|
visibility = _DEFAULT_VISIBILITY + [":minielf_users"],
|
|
deps = [
|
|
"//sandboxed_api:config",
|
|
"//sandboxed_api/sandbox2:util",
|
|
"//sandboxed_api/util:raw_logging",
|
|
"//sandboxed_api/util:status",
|
|
"//sandboxed_api/util:strerror",
|
|
"@com_google_absl//absl/base:endian",
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/status:statusor",
|
|
"@com_google_absl//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "minielf_test",
|
|
srcs = ["minielf_test.cc"],
|
|
copts = sapi_platform_copts(),
|
|
data = [
|
|
":testdata/chrome_grte_header",
|
|
":testdata/hello_world",
|
|
],
|
|
features = ["-dynamic_link_test_srcs"], # see go/dynamic_link_test_srcs
|
|
deps = [
|
|
":maps_parser",
|
|
":minielf",
|
|
"//sandboxed_api:testing",
|
|
"//sandboxed_api/util:file_helpers",
|
|
"//sandboxed_api/util:status_matchers",
|
|
"@com_google_absl//absl/algorithm:container",
|
|
"@com_google_absl//absl/strings",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "maps_parser",
|
|
srcs = ["maps_parser.cc"],
|
|
hdrs = ["maps_parser.h"],
|
|
copts = sapi_platform_copts(),
|
|
deps = [
|
|
"@com_google_absl//absl/status",
|
|
"@com_google_absl//absl/status:statusor",
|
|
"@com_google_absl//absl/strings",
|
|
],
|
|
)
|
|
|
|
cc_test(
|
|
name = "maps_parser_test",
|
|
srcs = ["maps_parser_test.cc"],
|
|
copts = sapi_platform_copts(),
|
|
deps = [
|
|
":maps_parser",
|
|
"//sandboxed_api/util:status_matchers",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|