mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
1e5e426e70
PiperOrigin-RevId: 426136170 Change-Id: I341a2d962637b53f9cfa475fbbfe3e6938ee3a95
94 lines
2.6 KiB
Python
94 lines
2.6 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")
|
|
|
|
package(default_visibility = [
|
|
"//sandboxed_api:__subpackages__",
|
|
"//security/bedebox:__subpackages__",
|
|
])
|
|
|
|
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(),
|
|
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",
|
|
],
|
|
)
|