mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
Make embedding the sandbox code the default
PiperOrigin-RevId: 257778382 Change-Id: Ib6dc472355092c08b905e42978efe7f47703c128
This commit is contained in:
parent
25709ee4cc
commit
ab35eb49af
@ -145,7 +145,7 @@ def sapi_library(
|
|||||||
lib,
|
lib,
|
||||||
lib_name,
|
lib_name,
|
||||||
namespace = "",
|
namespace = "",
|
||||||
embed = False,
|
embed = True,
|
||||||
add_default_deps = True,
|
add_default_deps = True,
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = [],
|
hdrs = [],
|
||||||
|
@ -23,7 +23,7 @@ sapi_library(
|
|||||||
srcs = [], # Extra code compiled with the SAPI library
|
srcs = [], # Extra code compiled with the SAPI library
|
||||||
hdrs = [] # Leave empty if embedded SAPI libraries are used, and the
|
hdrs = [] # Leave empty if embedded SAPI libraries are used, and the
|
||||||
# default sandbox policy is sufficient.
|
# default sandbox policy is sufficient.
|
||||||
embed = True,
|
embed = True, # This is the default
|
||||||
functions = [
|
functions = [
|
||||||
"deflateInit_",
|
"deflateInit_",
|
||||||
"deflate",
|
"deflate",
|
||||||
@ -48,7 +48,7 @@ sapi_library(
|
|||||||
in the library.
|
in the library.
|
||||||
* **`embed`** - whether the SAPI library should be embedded inside host code,
|
* **`embed`** - whether the SAPI library should be embedded inside host code,
|
||||||
so the SAPI Sandbox can be initialized with the
|
so the SAPI Sandbox can be initialized with the
|
||||||
`::sapi::Sandbox::Sandbox(FileToc*)` constructor.
|
`::sapi::Sandbox::Sandbox(FileToc*)` constructor. This is the default.
|
||||||
* **`lib`** - (mandatory) the library target you want to sandbox and expose to
|
* **`lib`** - (mandatory) the library target you want to sandbox and expose to
|
||||||
the host code.
|
the host code.
|
||||||
* **`lib_name`** - (mandatory) name of the object which is proxying your library
|
* **`lib_name`** - (mandatory) name of the object which is proxying your library
|
||||||
|
@ -40,7 +40,6 @@ sapi_library(
|
|||||||
name = "stringop-sapi",
|
name = "stringop-sapi",
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = ["sandbox.h"],
|
hdrs = ["sandbox.h"],
|
||||||
embed = True,
|
|
||||||
functions = [
|
functions = [
|
||||||
"duplicate_string",
|
"duplicate_string",
|
||||||
"reverse_string",
|
"reverse_string",
|
||||||
|
@ -44,7 +44,6 @@ sapi_library(
|
|||||||
name = "sum-sapi",
|
name = "sum-sapi",
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = ["sandbox.h"],
|
hdrs = ["sandbox.h"],
|
||||||
embed = True,
|
|
||||||
functions = [
|
functions = [
|
||||||
"sum",
|
"sum",
|
||||||
"sums",
|
"sums",
|
||||||
|
@ -23,7 +23,6 @@ sapi_library(
|
|||||||
name = "zlib-sapi",
|
name = "zlib-sapi",
|
||||||
srcs = [],
|
srcs = [],
|
||||||
hdrs = [],
|
hdrs = [],
|
||||||
embed = True,
|
|
||||||
functions = [
|
functions = [
|
||||||
"deflateInit_",
|
"deflateInit_",
|
||||||
"deflate",
|
"deflate",
|
||||||
|
@ -60,7 +60,6 @@ cc_library(
|
|||||||
# Targets for testing if generated code compiles
|
# Targets for testing if generated code compiles
|
||||||
sapi_library(
|
sapi_library(
|
||||||
name = "tests_sapi_generator",
|
name = "tests_sapi_generator",
|
||||||
embed = True,
|
|
||||||
input_files = [
|
input_files = [
|
||||||
"testdata/tests.cc",
|
"testdata/tests.cc",
|
||||||
"testdata/tests2.cc",
|
"testdata/tests2.cc",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user