From a0ba1c520f0bb72e8d9a8bf17580c074e666960e Mon Sep 17 00:00:00 2001 From: Oliver Kunz Date: Thu, 16 Nov 2023 10:00:29 -0800 Subject: [PATCH] Enable the ability to change the sandboxee's malloc implementation. The 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 --- sandboxed_api/bazel/sapi.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sandboxed_api/bazel/sapi.bzl b/sandboxed_api/bazel/sapi.bzl index 4b79e41..51f47a8 100644 --- a/sandboxed_api/bazel/sapi.bzl +++ b/sandboxed_api/bazel/sapi.bzl @@ -236,6 +236,7 @@ def sapi_library( name, lib, lib_name, + malloc = "@bazel_tools//tools/cpp:malloc", namespace = "", api_version = 1, embed = True, @@ -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",