Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make jemalloc compatible with bazel malloc #9

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ load("@rules_foreign_cc//foreign_cc:configure.bzl", "configure_make_variant")
filegroup(
name = "all",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)

alias(
# Wrap the cmake-built jemalloc code in a cc_library which can then be passed
# to a bazel cc_binary or cc_target `malloc` attribute.
# TODO(https://github.com/bazelbuild/rules_foreign_cc/issues/227): Remove this
# wrapper when bazel allows any target to be pasesd to `malloc`.
cc_library(
# The `configure_make_variant` wrapper around `configure_make` doesn't
# pass the 'visibility' setting correctly; it gets lost. As a
# workaround we use an alias with the correct visibility setting.
# workaround we wrap the target to give the correct visibility setting.
# TODO(xander): File an issue on `rules_foreign_cc` to preserve visibility.
name = "jemalloc",
actual = "jemalloc_preinstalled_make",
visibility = ["//visibility:public"],
deps = [":jemalloc_preinstalled_make"],
)

configure_make_variant(
Expand Down