Make embedding the sandbox code the default

PiperOrigin-RevId: 257778382
Change-Id: Ib6dc472355092c08b905e42978efe7f47703c128
This commit is contained in:
Christian Blichmann 2019-07-12 04:06:39 -07:00 committed by Copybara-Service
parent 25709ee4cc
commit ab35eb49af
6 changed files with 3 additions and 7 deletions

View File

@ -145,7 +145,7 @@ def sapi_library(
lib,
lib_name,
namespace = "",
embed = False,
embed = True,
add_default_deps = True,
srcs = [],
hdrs = [],

View File

@ -23,7 +23,7 @@ sapi_library(
srcs = [], # Extra code compiled with the SAPI library
hdrs = [] # Leave empty if embedded SAPI libraries are used, and the
# default sandbox policy is sufficient.
embed = True,
embed = True, # This is the default
functions = [
"deflateInit_",
"deflate",
@ -48,7 +48,7 @@ sapi_library(
in the library.
* **`embed`** - whether the SAPI library should be embedded inside host code,
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
the host code.
* **`lib_name`** - (mandatory) name of the object which is proxying your library

View File

@ -40,7 +40,6 @@ sapi_library(
name = "stringop-sapi",
srcs = [],
hdrs = ["sandbox.h"],
embed = True,
functions = [
"duplicate_string",
"reverse_string",

View File

@ -44,7 +44,6 @@ sapi_library(
name = "sum-sapi",
srcs = [],
hdrs = ["sandbox.h"],
embed = True,
functions = [
"sum",
"sums",

View File

@ -23,7 +23,6 @@ sapi_library(
name = "zlib-sapi",
srcs = [],
hdrs = [],
embed = True,
functions = [
"deflateInit_",
"deflate",

View File

@ -60,7 +60,6 @@ cc_library(
# Targets for testing if generated code compiles
sapi_library(
name = "tests_sapi_generator",
embed = True,
input_files = [
"testdata/tests.cc",
"testdata/tests2.cc",