mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
bazel: Add copts
, defines
, and data
to sapi_library()
This makes `sapi_library()` more compatible with Bazel's native `cc_library()` rule. PiperOrigin-RevId: 439512659 Change-Id: If731f600d56db56f78d2897e0c41a200daa93b75
This commit is contained in:
parent
1db315207a
commit
fc85310da2
|
@ -14,6 +14,7 @@
|
|||
|
||||
"""Starlark rules for projects using Sandboxed API."""
|
||||
|
||||
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:proto.bzl",
|
||||
|
@ -211,7 +212,10 @@ def sapi_library(
|
|||
add_default_deps = True,
|
||||
limit_scan_depth = False,
|
||||
srcs = [],
|
||||
data = [],
|
||||
hdrs = [],
|
||||
copts = sapi_platform_copts(),
|
||||
defines = [],
|
||||
functions = [],
|
||||
header = "",
|
||||
input_files = [],
|
||||
|
@ -234,8 +238,14 @@ def sapi_library(
|
|||
api_version: Which version of the Sandboxed API to generate. Currently,
|
||||
only version 1 is defined.
|
||||
srcs: Any additional sources to include with the sandboxed library
|
||||
data: To be used with srcs, any additional data files to make available
|
||||
to the sandboxed library.
|
||||
hdrs: Like srcs, any additional headers to include with the sandboxed
|
||||
library
|
||||
copts: Add these options to the C++ compilation command. See
|
||||
cc_library.copts.
|
||||
defines: List of defines to add to the compile line. See
|
||||
cc_library.defines.
|
||||
functions: A list for function to use from host code
|
||||
header: If set, do not generate a header, but use the specified one
|
||||
(deprecated).
|
||||
|
@ -280,8 +290,10 @@ def sapi_library(
|
|||
native.cc_library(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
data = [":" + name + ".bin"] + data,
|
||||
hdrs = lib_hdrs,
|
||||
data = [":" + name + ".bin"],
|
||||
copts = copts,
|
||||
defines = defines,
|
||||
deps = sort_deps(
|
||||
[
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
|
|
Loading…
Reference in New Issue
Block a user