2020-08-12 06:44:13 +08:00
|
|
|
load(
|
|
|
|
"@com_google_sandboxed_api//sandboxed_api/bazel:sapi.bzl",
|
|
|
|
"sapi_library",
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "guetzli_wrapper",
|
|
|
|
srcs = ["guetzli_entry_points.cc"],
|
|
|
|
hdrs = ["guetzli_entry_points.h"],
|
|
|
|
deps = [
|
|
|
|
"@guetzli//:guetzli_lib",
|
|
|
|
"@com_google_sandboxed_api//sandboxed_api:lenval_core",
|
|
|
|
"@com_google_sandboxed_api//sandboxed_api:vars",
|
|
|
|
"@png_archive//:png"
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
sapi_library(
|
|
|
|
name = "guetzli_sapi",
|
2020-08-12 06:48:48 +08:00
|
|
|
srcs = ["guetzli_transaction.cc"],
|
2020-08-12 06:44:13 +08:00
|
|
|
hdrs = ["guetzli_sandbox.h", "guetzli_transaction.h"],
|
|
|
|
functions = [
|
2020-08-12 06:48:48 +08:00
|
|
|
"ProcessJpeg",
|
|
|
|
"ProcessRgb",
|
2020-08-12 06:44:13 +08:00
|
|
|
"WriteDataToFd"
|
|
|
|
],
|
|
|
|
input_files = ["guetzli_entry_points.h"],
|
|
|
|
lib = ":guetzli_wrapper",
|
|
|
|
lib_name = "Guetzli",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
namespace = "guetzli::sandbox"
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name="guetzli_sandboxed",
|
|
|
|
srcs=["guetzli_sandboxed.cc"],
|
|
|
|
deps = [
|
|
|
|
":guetzli_sapi"
|
|
|
|
]
|
|
|
|
)
|