From 53115537efbabc7eb1b88658c7b26ab646f32782 Mon Sep 17 00:00:00 2001 From: Willy Tu Date: Tue, 17 Feb 2026 08:52:05 +0000 Subject: [PATCH] Enable static linking and system malloc for htool on gBMC Configure the htool build target to use fully static linking and system malloc when building gBMC platforms. Signed-off-by: Willy Tu --- examples/BUILD | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/BUILD b/examples/BUILD index db7184b..6e80e7a 100644 --- a/examples/BUILD +++ b/examples/BUILD @@ -230,6 +230,16 @@ cc_binary( "htool_usb.c", "htool_usb.h", ], + features = select({ + "//third_party/bazel_platforms/os:linux-gbmc": ["fully_static_link"], + "//buildenv/platforms/constraints/cc_toolchain:gbmc-armv8a": ["fully_static_link"], + "//conditions:default": [], + }), + malloc = select({ + "//third_party/bazel_platforms/os:linux-gbmc": "//base:system_malloc", + "//buildenv/platforms/constraints/cc_toolchain:gbmc-armv8a": "//base:system_malloc", + "//conditions:default": "//tools/cpp:malloc", + }), deps = [ ":host_commands", ":srtm",