Skip to content

Commit

Permalink
Enable the ability to change the sandboxee's malloc implementation. T…
Browse files Browse the repository at this point in the history
…he default is set to "@bazel_tools//tools/cpp:malloc", which is also the default for Bazel's cc_binary [1].

[1] https://bazel.build/reference/be/c-cpp#cc_binary

PiperOrigin-RevId: 583081047
Change-Id: I08e7f6d0dffb1926e7bf9a9a96a7d6727d4cd3d6
  • Loading branch information
okunz authored and copybara-github committed Nov 16, 2023
1 parent 9a171c7 commit a0ba1c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sandboxed_api/bazel/sapi.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def sapi_library(
name,
lib,
lib_name,
malloc = "@bazel_tools//tools/cpp:malloc",
namespace = "",
api_version = 1,
embed = True,
Expand Down Expand Up @@ -355,6 +356,7 @@ def sapi_library(
# The sandboxing client must have access to all
"-Wl,-E", # symbols used in the sandboxed library, so these
] + exported_funcs, # must be both referenced, and exported
malloc = malloc,
deps = [
":" + name + ".lib",
"//sandboxed_api:client",
Expand Down

0 comments on commit a0ba1c5

Please sign in to comment.