Disable compiler warnings for consistency with internal settings.

PiperOrigin-RevId: 247405215
Change-Id: I236170f7b47d9ecd32324db907ef7afc2e797d9a
This commit is contained in:
Christian Blichmann 2019-05-09 05:21:11 -07:00 committed by Copybara-Service
parent 63f0adbfbb
commit 7800fd7402
19 changed files with 174 additions and 16 deletions

View File

@ -16,6 +16,7 @@ licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"]) exports_files(["LICENSE"])
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
sapi_proto_library( sapi_proto_library(
@ -31,6 +32,7 @@ cc_library(
"file_toc.h", "file_toc.h",
], ],
hdrs = ["embed_file.h"], hdrs = ["embed_file.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//sandboxed_api/sandbox2:util", "//sandboxed_api/sandbox2:util",
@ -59,6 +61,7 @@ cc_library(
"sandbox.h", "sandbox.h",
"transaction.h", "transaction.h",
], ],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":embed_file", ":embed_file",
@ -89,6 +92,7 @@ cc_library(
cc_library( cc_library(
name = "call", name = "call",
hdrs = ["call.h"], hdrs = ["call.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":var_type", ":var_type",
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",
@ -98,12 +102,14 @@ cc_library(
cc_library( cc_library(
name = "lenval_core", name = "lenval_core",
hdrs = ["lenval_core.h"], hdrs = ["lenval_core.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
cc_library( cc_library(
name = "var_type", name = "var_type",
hdrs = ["var_type.h"], hdrs = ["var_type.h"],
copts = sapi_platform_copts(),
) )
# Variable hierarchy # Variable hierarchy
@ -131,6 +137,7 @@ cc_library(
"var_void.h", "var_void.h",
"vars.h", "vars.h",
], ],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":call", ":call",
@ -152,6 +159,7 @@ cc_library(
cc_library( cc_library(
name = "client", name = "client",
srcs = ["client.cc"], srcs = ["client.cc"],
copts = sapi_platform_copts(),
# TODO(124852776): investigate whether this is necessary # TODO(124852776): investigate whether this is necessary
linkopts = [ linkopts = [
"-Wl,-ldl", "-Wl,-ldl",
@ -176,6 +184,7 @@ cc_library(
cc_test( cc_test(
name = "sapi_test", name = "sapi_test",
srcs = ["sapi_test.cc"], srcs = ["sapi_test.cc"],
copts = sapi_platform_copts(),
tags = ["local"], tags = ["local"],
deps = [ deps = [
":sapi", ":sapi",

View File

@ -20,16 +20,15 @@ exports_files([
"sapi.bzl", "sapi.bzl",
]) ])
load( load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
"//sandboxed_api/bazel:embed_data.bzl", load("//sandboxed_api/bazel:embed_data.bzl", "sapi_cc_embed_data")
"sapi_cc_embed_data",
)
# An implicit dependency of all "sapi_cc_embed_data" rules that builds # An implicit dependency of all "sapi_cc_embed_data" rules that builds
# embedded data into .cc files. # embedded data into .cc files.
cc_binary( cc_binary(
name = "filewrapper", name = "filewrapper",
srcs = ["filewrapper.cc"], srcs = ["filewrapper.cc"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -48,6 +47,7 @@ sapi_cc_embed_data(
cc_test( cc_test(
name = "filewrapper_test", name = "filewrapper_test",
srcs = ["filewrapper_test.cc"], srcs = ["filewrapper_test.cc"],
copts = sapi_platform_copts(),
data = ["testdata/filewrapper_embedded.bin"], data = ["testdata/filewrapper_embedded.bin"],
deps = [ deps = [
":filewrapper_embedded", ":filewrapper_embedded",

View File

@ -0,0 +1,30 @@
# Copyright 2019 Google LLC. All Rights Reserved.
#
# 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.
"""General build definitions useful for the whole project."""
_SAPI_LINUX_COPTS = [
"-Wno-narrowing",
"-Wno-sign-compare",
]
def sapi_platform_copts(copts = []):
"""Returns the default compiler options for the current platform.
Args:
copts: additional compiler options to include.
"""
# Linux only for now.
return select({"//conditions:default": _SAPI_LINUX_COPTS}) + copts

View File

@ -16,9 +16,12 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
cc_test( cc_test(
name = "main_stringop", name = "main_stringop",
srcs = ["main_stringop.cc"], srcs = ["main_stringop.cc"],
copts = sapi_platform_copts(),
tags = ["local"], tags = ["local"],
deps = [ deps = [
"//sandboxed_api:sapi", "//sandboxed_api:sapi",

View File

@ -14,6 +14,7 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") load("//sandboxed_api/bazel:sapi.bzl", "sapi_library")
@ -26,6 +27,7 @@ sapi_proto_library(
cc_library( cc_library(
name = "stringop", name = "stringop",
srcs = ["stringop.cc"], srcs = ["stringop.cc"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":stringop_params_proto_cc", ":stringop_params_proto_cc",

View File

@ -14,10 +14,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# A quick'n'dirty testing binary # A quick'n'dirty testing binary
cc_binary( cc_binary(
name = "main_sum", name = "main_sum",
srcs = ["main_sum.cc"], srcs = ["main_sum.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api:sapi", "//sandboxed_api:sapi",
"//sandboxed_api:vars", "//sandboxed_api:vars",

View File

@ -14,11 +14,9 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") load("//sandboxed_api/bazel:sapi.bzl", "sapi_library")
load(
"//sandboxed_api/bazel:proto.bzl",
"sapi_proto_library",
)
sapi_proto_library( sapi_proto_library(
name = "sum_params_proto", name = "sum_params_proto",
@ -33,6 +31,7 @@ cc_library(
"sum.c", "sum.c",
"sum_cpp.cc", "sum_cpp.cc",
], ],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":sum_params_proto_cc", ":sum_params_proto_cc",

View File

@ -16,6 +16,7 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") load("//sandboxed_api/bazel:sapi.bzl", "sapi_library")
sapi_library( sapi_library(
@ -36,7 +37,7 @@ sapi_library(
cc_binary( cc_binary(
name = "main_zlib", name = "main_zlib",
srcs = ["main_zlib.cc"], srcs = ["main_zlib.cc"],
copts = ["-Wframe-larger-than=65536"], copts = sapi_platform_copts(["-Wframe-larger-than=65536"]),
deps = [ deps = [
":zlib-sapi", ":zlib-sapi",
":zlib-sapi_embed", ":zlib-sapi_embed",

View File

@ -20,13 +20,15 @@ package(default_visibility = [
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:embed_data.bzl", "sapi_cc_embed_data") load("//sandboxed_api/bazel:embed_data.bzl", "sapi_cc_embed_data")
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
cc_library( cc_library(
name = "bpfdisassembler", name = "bpfdisassembler",
srcs = ["bpfdisassembler.cc"], srcs = ["bpfdisassembler.cc"],
hdrs = ["bpfdisassembler.h"], hdrs = ["bpfdisassembler.h"],
copts = sapi_platform_copts(),
deps = ["@com_google_absl//absl/strings"], deps = ["@com_google_absl//absl/strings"],
) )
@ -34,6 +36,7 @@ cc_library(
name = "regs", name = "regs",
srcs = ["regs.cc"], srcs = ["regs.cc"],
hdrs = ["regs.h"], hdrs = ["regs.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":syscall", ":syscall",
":violation_proto_cc", ":violation_proto_cc",
@ -52,6 +55,7 @@ cc_library(
"syscall_defs.h", "syscall_defs.h",
], ],
hdrs = ["syscall.h"], hdrs = ["syscall.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":util", ":util",
@ -65,6 +69,7 @@ cc_library(
cc_test( cc_test(
name = "syscall_test", name = "syscall_test",
srcs = ["syscall_test.cc"], srcs = ["syscall_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":syscall", ":syscall",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -76,6 +81,7 @@ cc_library(
name = "result", name = "result",
srcs = ["result.cc"], srcs = ["result.cc"],
hdrs = ["result.h"], hdrs = ["result.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":regs", ":regs",
":syscall", ":syscall",
@ -96,6 +102,7 @@ cc_library(
name = "logserver", name = "logserver",
srcs = ["logserver.cc"], srcs = ["logserver.cc"],
hdrs = ["logserver.h"], hdrs = ["logserver.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":comms", ":comms",
":logserver_proto_cc", ":logserver_proto_cc",
@ -108,6 +115,7 @@ cc_library(
name = "logsink", name = "logsink",
srcs = ["logsink.cc"], srcs = ["logsink.cc"],
hdrs = ["logsink.h"], hdrs = ["logsink.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":comms", ":comms",
@ -122,6 +130,7 @@ cc_library(
name = "network_proxy_server", name = "network_proxy_server",
srcs = ["network_proxy_server.cc"], srcs = ["network_proxy_server.cc"],
hdrs = ["network_proxy_server.h"], hdrs = ["network_proxy_server.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":comms", ":comms",
"//sandboxed_api/sandbox2/util:fileops", "//sandboxed_api/sandbox2/util:fileops",
@ -134,6 +143,7 @@ cc_library(
name = "network_proxy_client", name = "network_proxy_client",
srcs = ["network_proxy_client.cc"], srcs = ["network_proxy_client.cc"],
hdrs = ["network_proxy_client.h"], hdrs = ["network_proxy_client.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":comms", ":comms",
@ -149,6 +159,7 @@ cc_library(
name = "ipc", name = "ipc",
srcs = ["ipc.cc"], srcs = ["ipc.cc"],
hdrs = ["ipc.h"], hdrs = ["ipc.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":comms", ":comms",
":logserver", ":logserver",
@ -165,6 +176,7 @@ cc_library(
name = "policy", name = "policy",
srcs = ["policy.cc"], srcs = ["policy.cc"],
hdrs = ["policy.h"], hdrs = ["policy.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":bpfdisassembler", ":bpfdisassembler",
":comms", ":comms",
@ -184,6 +196,7 @@ cc_library(
name = "notify", name = "notify",
srcs = [], srcs = [],
hdrs = ["notify.h"], hdrs = ["notify.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":comms", ":comms",
":result", ":result",
@ -194,6 +207,7 @@ cc_library(
cc_library( cc_library(
name = "limits", name = "limits",
hdrs = ["limits.h"], hdrs = ["limits.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/time", "@com_google_absl//absl/time",
@ -203,6 +217,7 @@ cc_library(
cc_binary( cc_binary(
name = "forkserver_bin", name = "forkserver_bin",
srcs = ["forkserver_bin.cc"], srcs = ["forkserver_bin.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":client", ":client",
":comms", ":comms",
@ -223,6 +238,7 @@ cc_library(
name = "global_forkserver", name = "global_forkserver",
srcs = ["global_forkclient.cc"], srcs = ["global_forkclient.cc"],
hdrs = ["global_forkclient.h"], hdrs = ["global_forkclient.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":client", ":client",
":comms", ":comms",
@ -263,6 +279,7 @@ cc_library(
"syscall.h", "syscall.h",
"client.h", "client.h",
], ],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":client", ":client",
@ -320,6 +337,7 @@ cc_library(
"client.h", "client.h",
"sanitizer.h", "sanitizer.h",
], ],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":comms", ":comms",
@ -339,6 +357,7 @@ cc_library(
name = "forkserver", name = "forkserver",
srcs = ["forkserver.cc"], srcs = ["forkserver.cc"],
hdrs = ["forkserver.h"], hdrs = ["forkserver.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":client", ":client",
@ -366,6 +385,7 @@ cc_library(
name = "mounts", name = "mounts",
srcs = ["mounts.cc"], srcs = ["mounts.cc"],
hdrs = ["mounts.h"], hdrs = ["mounts.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":mounttree_proto_cc", ":mounttree_proto_cc",
"//sandboxed_api/sandbox2/util:file_base", "//sandboxed_api/sandbox2/util:file_base",
@ -385,6 +405,7 @@ cc_library(
cc_test( cc_test(
name = "mounts_test", name = "mounts_test",
srcs = ["mounts_test.cc"], srcs = ["mounts_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:minimal_dynamic"], data = ["//sandboxed_api/sandbox2/testcases:minimal_dynamic"],
deps = [ deps = [
":mounts", ":mounts",
@ -402,6 +423,7 @@ cc_library(
name = "namespace", name = "namespace",
srcs = ["namespace.cc"], srcs = ["namespace.cc"],
hdrs = ["namespace.h"], hdrs = ["namespace.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":mounts", ":mounts",
":mounttree_proto_cc", ":mounttree_proto_cc",
@ -420,6 +442,7 @@ cc_library(
cc_test( cc_test(
name = "namespace_test", name = "namespace_test",
srcs = ["namespace_test.cc"], srcs = ["namespace_test.cc"],
copts = sapi_platform_copts(),
data = [ data = [
"//sandboxed_api/sandbox2/testcases:hostname", "//sandboxed_api/sandbox2/testcases:hostname",
"//sandboxed_api/sandbox2/testcases:namespace", "//sandboxed_api/sandbox2/testcases:namespace",
@ -441,6 +464,7 @@ cc_library(
name = "forkingclient", name = "forkingclient",
srcs = ["forkingclient.cc"], srcs = ["forkingclient.cc"],
hdrs = ["forkingclient.h"], hdrs = ["forkingclient.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":client", ":client",
@ -457,7 +481,7 @@ cc_library(
# The default is 16384, however we need to do a clone with a # The default is 16384, however we need to do a clone with a
# stack-allocated buffer -- and PTHREAD_STACK_MIN also happens to be 16384. # stack-allocated buffer -- and PTHREAD_STACK_MIN also happens to be 16384.
# Thus the slight increase. # Thus the slight increase.
copts = ["-Wframe-larger-than=17000"], copts = sapi_platform_copts(["-Wframe-larger-than=17000"]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//sandboxed_api/sandbox2/util:file_base", "//sandboxed_api/sandbox2/util:file_base",
@ -476,6 +500,7 @@ cc_library(
name = "buffer", name = "buffer",
srcs = ["buffer.cc"], srcs = ["buffer.cc"],
hdrs = ["buffer.h"], hdrs = ["buffer.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":util", ":util",
@ -491,6 +516,7 @@ cc_library(
cc_test( cc_test(
name = "buffer_test", name = "buffer_test",
srcs = ["buffer_test.cc"], srcs = ["buffer_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:buffer"], data = ["//sandboxed_api/sandbox2/testcases:buffer"],
deps = [ deps = [
":buffer", ":buffer",
@ -506,6 +532,7 @@ cc_test(
sapi_proto_library( sapi_proto_library(
name = "forkserver_proto", name = "forkserver_proto",
srcs = ["forkserver.proto"], srcs = ["forkserver.proto"],
copts = sapi_platform_copts(),
deps = [":mounttree_proto"], deps = [":mounttree_proto"],
) )
@ -518,6 +545,7 @@ cc_library(
name = "comms", name = "comms",
srcs = ["comms.cc"], srcs = ["comms.cc"],
hdrs = ["comms.h"], hdrs = ["comms.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":util", ":util",
@ -543,6 +571,7 @@ sapi_proto_library(
cc_test( cc_test(
name = "comms_test", name = "comms_test",
srcs = ["comms_test.cc"], srcs = ["comms_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":comms", ":comms",
":comms_test_proto_cc", ":comms_test_proto_cc",
@ -561,6 +590,7 @@ cc_test(
"forkserver_test.cc", "forkserver_test.cc",
"global_forkclient.h", "global_forkclient.h",
], ],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:minimal"], data = ["//sandboxed_api/sandbox2/testcases:minimal"],
deps = [ deps = [
":comms", ":comms",
@ -577,6 +607,7 @@ cc_test(
cc_test( cc_test(
name = "limits_test", name = "limits_test",
srcs = ["limits_test.cc"], srcs = ["limits_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:limits"], data = ["//sandboxed_api/sandbox2/testcases:limits"],
deps = [ deps = [
":limits", ":limits",
@ -592,6 +623,7 @@ cc_test(
cc_test( cc_test(
name = "notify_test", name = "notify_test",
srcs = ["notify_test.cc"], srcs = ["notify_test.cc"],
copts = sapi_platform_copts(),
data = [ data = [
"//sandboxed_api/sandbox2/testcases:personality", "//sandboxed_api/sandbox2/testcases:personality",
"//sandboxed_api/sandbox2/testcases:pidcomms", "//sandboxed_api/sandbox2/testcases:pidcomms",
@ -611,6 +643,7 @@ cc_test(
cc_test( cc_test(
name = "policy_test", name = "policy_test",
srcs = ["policy_test.cc"], srcs = ["policy_test.cc"],
copts = sapi_platform_copts(),
data = [ data = [
"//sandboxed_api/sandbox2/testcases:add_policy_on_syscalls", "//sandboxed_api/sandbox2/testcases:add_policy_on_syscalls",
"//sandboxed_api/sandbox2/testcases:malloc_system", "//sandboxed_api/sandbox2/testcases:malloc_system",
@ -633,6 +666,7 @@ cc_test(
cc_test( cc_test(
name = "sandbox2_test", name = "sandbox2_test",
srcs = ["sandbox2_test.cc"], srcs = ["sandbox2_test.cc"],
copts = sapi_platform_copts(),
data = [ data = [
"//sandboxed_api/sandbox2/testcases:abort", "//sandboxed_api/sandbox2/testcases:abort",
"//sandboxed_api/sandbox2/testcases:minimal", "//sandboxed_api/sandbox2/testcases:minimal",
@ -654,6 +688,7 @@ cc_test(
cc_test( cc_test(
name = "sanitizer_test", name = "sanitizer_test",
srcs = ["sanitizer_test.cc"], srcs = ["sanitizer_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:sanitizer"], data = ["//sandboxed_api/sandbox2/testcases:sanitizer"],
deps = [ deps = [
":client", ":client",
@ -672,6 +707,7 @@ cc_test(
cc_test( cc_test(
name = "util_test", name = "util_test",
srcs = ["util_test.cc"], srcs = ["util_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":testing", ":testing",
":util", ":util",
@ -683,6 +719,7 @@ cc_test(
cc_test( cc_test(
name = "stack-trace_test", name = "stack-trace_test",
srcs = ["stack-trace_test.cc"], srcs = ["stack-trace_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:symbolize"], data = ["//sandboxed_api/sandbox2/testcases:symbolize"],
deps = [ deps = [
":global_forkserver", ":global_forkserver",
@ -702,6 +739,7 @@ cc_test(
cc_test( cc_test(
name = "ipc_test", name = "ipc_test",
srcs = ["ipc_test.cc"], srcs = ["ipc_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:ipc"], data = ["//sandboxed_api/sandbox2/testcases:ipc"],
deps = [ deps = [
":comms", ":comms",
@ -720,6 +758,7 @@ cc_library(
testonly = 1, testonly = 1,
srcs = ["testing.cc"], srcs = ["testing.cc"],
hdrs = ["testing.h"], hdrs = ["testing.h"],
copts = sapi_platform_copts(),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//sandboxed_api/sandbox2/util:file_base", "//sandboxed_api/sandbox2/util:file_base",
@ -736,6 +775,7 @@ sapi_proto_library(
cc_test( cc_test(
name = "policybuilder_test", name = "policybuilder_test",
srcs = ["policybuilder_test.cc"], srcs = ["policybuilder_test.cc"],
copts = sapi_platform_copts(),
data = ["//sandboxed_api/sandbox2/testcases:print_fds"], data = ["//sandboxed_api/sandbox2/testcases:print_fds"],
deps = [ deps = [
":comms", ":comms",

View File

@ -21,10 +21,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# Executor # Executor
cc_binary( cc_binary(
name = "crc4sandbox", name = "crc4sandbox",
srcs = ["crc4sandbox.cc"], srcs = ["crc4sandbox.cc"],
copts = sapi_platform_copts(),
data = [":crc4bin"], data = [":crc4bin"],
deps = [ deps = [
"//sandboxed_api/sandbox2", "//sandboxed_api/sandbox2",
@ -40,6 +43,7 @@ cc_binary(
cc_binary( cc_binary(
name = "crc4bin", name = "crc4bin",
srcs = ["crc4bin.cc"], srcs = ["crc4bin.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2:client", "//sandboxed_api/sandbox2:client",
"//sandboxed_api/sandbox2:comms", "//sandboxed_api/sandbox2:comms",
@ -49,10 +53,10 @@ cc_binary(
], ],
) )
# Test
cc_test( cc_test(
name = "crc4sandbox_test", name = "crc4sandbox_test",
srcs = ["crc4sandbox_test.cc"], srcs = ["crc4sandbox_test.cc"],
copts = sapi_platform_copts(),
data = [":crc4sandbox"], data = [":crc4sandbox"],
tags = ["local"], tags = ["local"],
deps = [ deps = [

View File

@ -18,10 +18,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# Executor # Executor
cc_binary( cc_binary(
name = "custom_fork_sandbox", name = "custom_fork_sandbox",
srcs = ["custom_fork_sandbox.cc"], srcs = ["custom_fork_sandbox.cc"],
copts = sapi_platform_copts(),
data = [":custom_fork_bin"], data = [":custom_fork_bin"],
deps = [ deps = [
"//sandboxed_api/sandbox2", "//sandboxed_api/sandbox2",
@ -39,6 +42,7 @@ cc_binary(
cc_binary( cc_binary(
name = "custom_fork_bin", name = "custom_fork_bin",
srcs = ["custom_fork_bin.cc"], srcs = ["custom_fork_bin.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2:comms", "//sandboxed_api/sandbox2:comms",
"//sandboxed_api/sandbox2:forkingclient", "//sandboxed_api/sandbox2:forkingclient",

View File

@ -21,10 +21,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# Executor # Executor
cc_binary( cc_binary(
name = "static_sandbox", name = "static_sandbox",
srcs = ["static_sandbox.cc"], srcs = ["static_sandbox.cc"],
copts = sapi_platform_copts(),
data = [":static_bin"], data = [":static_bin"],
deps = [ deps = [
"//sandboxed_api/sandbox2", "//sandboxed_api/sandbox2",
@ -40,6 +43,7 @@ cc_binary(
cc_binary( cc_binary(
name = "static_bin", name = "static_bin",
srcs = ["static_bin.cc"], srcs = ["static_bin.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically

View File

@ -22,10 +22,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# Executor # Executor
cc_binary( cc_binary(
name = "sandbox2tool", name = "sandbox2tool",
srcs = ["sandbox2tool.cc"], srcs = ["sandbox2tool.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2", "//sandboxed_api/sandbox2",
"//sandboxed_api/sandbox2:util", "//sandboxed_api/sandbox2:util",

View File

@ -14,10 +14,13 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
# Executor # Executor
cc_binary( cc_binary(
name = "zpipe_sandbox", name = "zpipe_sandbox",
srcs = ["zpipe_sandbox.cc"], srcs = ["zpipe_sandbox.cc"],
copts = sapi_platform_copts(),
data = [":zpipe"], data = [":zpipe"],
deps = [ deps = [
"//sandboxed_api/sandbox2", "//sandboxed_api/sandbox2",
@ -33,6 +36,7 @@ cc_binary(
cc_binary( cc_binary(
name = "zpipe", name = "zpipe",
srcs = ["zpipe.c"], srcs = ["zpipe.c"],
copts = sapi_platform_copts(),
features = [ features = [
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
], ],

View File

@ -28,6 +28,8 @@ package(default_visibility = [
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
STATIC_LINKOPTS = [ STATIC_LINKOPTS = [
# Necessary for linking pthread statically into the binary. See the # Necessary for linking pthread statically into the binary. See the
# answer to https://stackoverflow.com/questions/35116327/ for context. # answer to https://stackoverflow.com/questions/35116327/ for context.
@ -42,6 +44,7 @@ cc_binary(
name = "abort", name = "abort",
testonly = 1, testonly = 1,
srcs = ["abort.cc"], srcs = ["abort.cc"],
copts = sapi_platform_copts(),
deps = ["//sandboxed_api/util:raw_logging"], deps = ["//sandboxed_api/util:raw_logging"],
) )
@ -50,6 +53,7 @@ cc_binary(
name = "add_policy_on_syscalls", name = "add_policy_on_syscalls",
testonly = 1, testonly = 1,
srcs = ["add_policy_on_syscalls.cc"], srcs = ["add_policy_on_syscalls.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -62,6 +66,7 @@ cc_binary(
name = "buffer", name = "buffer",
testonly = 1, testonly = 1,
srcs = ["buffer.cc"], srcs = ["buffer.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -79,6 +84,7 @@ cc_binary(
name = "ipc", name = "ipc",
testonly = 1, testonly = 1,
srcs = ["ipc.cc"], srcs = ["ipc.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2:client", "//sandboxed_api/sandbox2:client",
"//sandboxed_api/sandbox2:comms", "//sandboxed_api/sandbox2:comms",
@ -92,6 +98,7 @@ cc_binary(
name = "malloc_system", name = "malloc_system",
testonly = 1, testonly = 1,
srcs = ["malloc.cc"], srcs = ["malloc.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -103,6 +110,7 @@ cc_binary(
name = "minimal_dynamic", name = "minimal_dynamic",
testonly = 1, testonly = 1,
srcs = ["minimal.cc"], srcs = ["minimal.cc"],
copts = sapi_platform_copts(),
) )
# security: disable=cc-static-no-pie # security: disable=cc-static-no-pie
@ -110,6 +118,7 @@ cc_binary(
name = "minimal", name = "minimal",
testonly = 1, testonly = 1,
srcs = ["minimal.cc"], srcs = ["minimal.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -122,6 +131,7 @@ cc_binary(
name = "personality", name = "personality",
testonly = 1, testonly = 1,
srcs = ["personality.cc"], srcs = ["personality.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -134,6 +144,7 @@ cc_binary(
name = "pidcomms", name = "pidcomms",
testonly = 1, testonly = 1,
srcs = ["pidcomms.cc"], srcs = ["pidcomms.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -152,6 +163,7 @@ cc_binary(
name = "policy", name = "policy",
testonly = 1, testonly = 1,
srcs = ["policy.cc"], srcs = ["policy.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -164,6 +176,7 @@ cc_binary(
name = "print_fds", name = "print_fds",
testonly = 1, testonly = 1,
srcs = ["print_fds.cc"], srcs = ["print_fds.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -176,6 +189,7 @@ cc_binary(
name = "sanitizer", name = "sanitizer",
testonly = 1, testonly = 1,
srcs = ["sanitizer.cc"], srcs = ["sanitizer.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -188,6 +202,7 @@ cc_binary(
name = "sleep", name = "sleep",
testonly = 1, testonly = 1,
srcs = ["sleep.cc"], srcs = ["sleep.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -200,6 +215,7 @@ cc_binary(
name = "symbolize", name = "symbolize",
testonly = 1, testonly = 1,
srcs = ["symbolize.cc"], srcs = ["symbolize.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -217,6 +233,7 @@ cc_binary(
name = "tsync", name = "tsync",
testonly = 1, testonly = 1,
srcs = ["tsync.cc"], srcs = ["tsync.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2:client", "//sandboxed_api/sandbox2:client",
"//sandboxed_api/sandbox2:comms", "//sandboxed_api/sandbox2:comms",
@ -227,6 +244,7 @@ cc_binary(
name = "hostname", name = "hostname",
testonly = 1, testonly = 1,
srcs = ["hostname.cc"], srcs = ["hostname.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -238,6 +256,7 @@ cc_binary(
name = "limits", name = "limits",
testonly = 1, testonly = 1,
srcs = ["limits.cc"], srcs = ["limits.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically
@ -249,6 +268,7 @@ cc_binary(
name = "namespace", name = "namespace",
testonly = 1, testonly = 1,
srcs = ["namespace.cc"], srcs = ["namespace.cc"],
copts = sapi_platform_copts(),
features = [ features = [
"-pie", "-pie",
"fully_static_link", # link libc statically "fully_static_link", # link libc statically

View File

@ -18,19 +18,21 @@ package(default_visibility = [
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
cc_library( cc_library(
name = "ptrace_hook", name = "ptrace_hook",
srcs = ["ptrace_hook.cc"], srcs = ["ptrace_hook.cc"],
hdrs = ["ptrace_hook.h"], hdrs = ["ptrace_hook.h"],
copts = sapi_platform_copts(),
) )
cc_library( cc_library(
name = "unwind", name = "unwind",
srcs = ["unwind.cc"], srcs = ["unwind.cc"],
hdrs = ["unwind.h"], hdrs = ["unwind.h"],
copts = [ copts = sapi_platform_copts([
# TODO(cblichmann): Remove this, fix bazel/external/libunwind.BUILD # TODO(cblichmann): Remove this, fix bazel/external/libunwind.BUILD
"-Iexternal/org_gnu_libunwind/include", "-Iexternal/org_gnu_libunwind/include",
] + [ ] + [
@ -46,7 +48,7 @@ cc_library(
"_Ux86_64_init_remote", "_Ux86_64_init_remote",
"_Ux86_64_step", "_Ux86_64_step",
] ]
], ]),
deps = [ deps = [
":unwind_proto_cc", ":unwind_proto_cc",
"//sandboxed_api/sandbox2:comms", "//sandboxed_api/sandbox2:comms",

View File

@ -19,10 +19,14 @@ package(default_visibility = [
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
cc_library( cc_library(
name = "bpf_helper", name = "bpf_helper",
srcs = ["bpf_helper.c"], srcs = ["bpf_helper.c"],
hdrs = ["bpf_helper.h"], hdrs = ["bpf_helper.h"],
copts = sapi_platform_copts([
]),
) )
# String file routines # String file routines
@ -30,6 +34,7 @@ cc_library(
name = "file_helpers", name = "file_helpers",
srcs = ["file_helpers.cc"], srcs = ["file_helpers.cc"],
hdrs = ["file_helpers.h"], hdrs = ["file_helpers.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/util:status", "//sandboxed_api/util:status",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -40,6 +45,7 @@ cc_test(
name = "file_helpers_test", name = "file_helpers_test",
size = "small", size = "small",
srcs = ["file_helpers_test.cc"], srcs = ["file_helpers_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":file_helpers", ":file_helpers",
"//sandboxed_api/util:status_matchers", "//sandboxed_api/util:status_matchers",
@ -53,9 +59,9 @@ cc_library(
name = "fileops", name = "fileops",
srcs = ["fileops.cc"], srcs = ["fileops.cc"],
hdrs = ["fileops.h"], hdrs = ["fileops.h"],
copts = [ copts = sapi_platform_copts([
"-Wno-deprecated-declarations", # readdir64_r "-Wno-deprecated-declarations", # readdir64_r
], ]),
deps = [ deps = [
":strerror", ":strerror",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -66,6 +72,7 @@ cc_test(
name = "fileops_test", name = "fileops_test",
size = "small", size = "small",
srcs = ["fileops_test.cc"], srcs = ["fileops_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":file_helpers", ":file_helpers",
":fileops", ":fileops",
@ -81,6 +88,7 @@ cc_library(
name = "file_base", name = "file_base",
srcs = ["path.cc"], srcs = ["path.cc"],
hdrs = ["path.h"], hdrs = ["path.h"],
copts = sapi_platform_copts(),
deps = ["@com_google_absl//absl/strings"], deps = ["@com_google_absl//absl/strings"],
) )
@ -88,6 +96,7 @@ cc_test(
name = "file_base_test", name = "file_base_test",
size = "small", size = "small",
srcs = ["path_test.cc"], srcs = ["path_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":file_base", ":file_base",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -101,6 +110,7 @@ cc_library(
name = "strerror", name = "strerror",
srcs = ["strerror.cc"], srcs = ["strerror.cc"],
hdrs = ["strerror.h"], hdrs = ["strerror.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -110,6 +120,7 @@ cc_library(
cc_test( cc_test(
name = "strerror_test", name = "strerror_test",
srcs = ["strerror_test.cc"], srcs = ["strerror_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":strerror", ":strerror",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -121,6 +132,7 @@ cc_library(
name = "minielf", name = "minielf",
srcs = ["minielf.cc"], srcs = ["minielf.cc"],
hdrs = ["minielf.h"], hdrs = ["minielf.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":strerror", ":strerror",
"//sandboxed_api/sandbox2:util", "//sandboxed_api/sandbox2:util",
@ -135,6 +147,7 @@ cc_library(
cc_test( cc_test(
name = "minielf_test", name = "minielf_test",
srcs = ["minielf_test.cc"], srcs = ["minielf_test.cc"],
copts = sapi_platform_copts(),
data = [ data = [
":testdata/chrome_grte_header", ":testdata/chrome_grte_header",
":testdata/hello_world", ":testdata/hello_world",
@ -154,6 +167,7 @@ cc_library(
name = "temp_file", name = "temp_file",
srcs = ["temp_file.cc"], srcs = ["temp_file.cc"],
hdrs = ["temp_file.h"], hdrs = ["temp_file.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":fileops", ":fileops",
":strerror", ":strerror",
@ -166,6 +180,7 @@ cc_library(
cc_test( cc_test(
name = "temp_file_test", name = "temp_file_test",
srcs = ["temp_file_test.cc"], srcs = ["temp_file_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":file_base", ":file_base",
":fileops", ":fileops",
@ -180,6 +195,7 @@ cc_library(
name = "maps_parser", name = "maps_parser",
srcs = ["maps_parser.cc"], srcs = ["maps_parser.cc"],
hdrs = ["maps_parser.h"], hdrs = ["maps_parser.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/util:status", "//sandboxed_api/util:status",
"//sandboxed_api/util:statusor", "//sandboxed_api/util:statusor",
@ -190,6 +206,7 @@ cc_library(
cc_test( cc_test(
name = "maps_parser_test", name = "maps_parser_test",
srcs = ["maps_parser_test.cc"], srcs = ["maps_parser_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":maps_parser", ":maps_parser",
"//sandboxed_api/util:status_matchers", "//sandboxed_api/util:status_matchers",
@ -201,6 +218,7 @@ cc_library(
name = "runfiles", name = "runfiles",
srcs = ["runfiles.cc"], srcs = ["runfiles.cc"],
hdrs = ["runfiles.h"], hdrs = ["runfiles.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":file_base", ":file_base",
"//sandboxed_api/util:flag", "//sandboxed_api/util:flag",

View File

@ -14,6 +14,7 @@
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
load("//sandboxed_api/bazel:sapi.bzl", "sapi_library") load("//sandboxed_api/bazel:sapi.bzl", "sapi_library")
py_library( py_library(
@ -54,6 +55,7 @@ cc_library(
"testdata/tests.h", "testdata/tests.h",
"testdata/tests2.cc", "testdata/tests2.cc",
], ],
copts = sapi_platform_copts(),
alwayslink = 1, alwayslink = 1,
) )
@ -77,6 +79,7 @@ cc_binary(
":tests_sapi_generator.sapi.h", ":tests_sapi_generator.sapi.h",
":tests_sapi_generator_embed.h", ":tests_sapi_generator_embed.h",
], ],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api:sapi", "//sandboxed_api:sapi",
"//sandboxed_api:vars", "//sandboxed_api:vars",

View File

@ -17,6 +17,7 @@ package(default_visibility = ["//sandboxed_api:__subpackages__"])
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library") load("//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
sapi_proto_library( sapi_proto_library(
name = "status_proto", name = "status_proto",
@ -37,6 +38,7 @@ cc_library(
"status_internal.h", "status_internal.h",
"status_macros.h", "status_macros.h",
], ],
copts = sapi_platform_copts(),
deps = [ deps = [
":status_proto_cc", ":status_proto_cc",
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",
@ -48,6 +50,7 @@ cc_library(
cc_library( cc_library(
name = "statusor", name = "statusor",
hdrs = ["statusor.h"], hdrs = ["statusor.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":raw_logging", ":raw_logging",
":status", ":status",
@ -63,6 +66,7 @@ cc_library(
name = "status_matchers", name = "status_matchers",
testonly = 1, testonly = 1,
hdrs = ["status_matchers.h"], hdrs = ["status_matchers.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
":status", ":status",
":statusor", ":statusor",
@ -75,6 +79,7 @@ cc_library(
cc_test( cc_test(
name = "status_test", name = "status_test",
srcs = ["status_test.cc"], srcs = ["status_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":status", ":status",
":status_matchers", ":status_matchers",
@ -86,6 +91,7 @@ cc_test(
cc_test( cc_test(
name = "statusor_test", name = "statusor_test",
srcs = ["statusor_test.cc"], srcs = ["statusor_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":status", ":status",
":status_matchers", ":status_matchers",
@ -98,6 +104,7 @@ cc_test(
cc_test( cc_test(
name = "status_macros_test", name = "status_macros_test",
srcs = ["status_macros_test.cc"], srcs = ["status_macros_test.cc"],
copts = sapi_platform_copts(),
deps = [ deps = [
":status", ":status",
":status_matchers", ":status_matchers",
@ -112,6 +119,7 @@ cc_test(
cc_library( cc_library(
name = "flag", name = "flag",
hdrs = ["flag.h"], hdrs = ["flag.h"],
copts = sapi_platform_copts(),
deps = ["@com_github_gflags_gflags//:gflags"], deps = ["@com_github_gflags_gflags//:gflags"],
) )
@ -121,6 +129,7 @@ cc_library(
name = "raw_logging", name = "raw_logging",
srcs = ["raw_logging.cc"], srcs = ["raw_logging.cc"],
hdrs = ["raw_logging.h"], hdrs = ["raw_logging.h"],
copts = sapi_platform_copts(),
deps = [ deps = [
"//sandboxed_api/sandbox2/util:strerror", "//sandboxed_api/sandbox2/util:strerror",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",