xref: /aosp_15_r20/external/bazelbuild-rules_rust/ffi/cc/allocator_library/BUILD.bazel (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1load("@rules_cc//cc:defs.bzl", "cc_library")
2
3cc_library(
4    name = "allocator_library",
5    srcs = select({
6        # Windows doesn't support weak symbol linkage.
7        # If someone can make this work on Windows, please do!
8        # For now we will silently not supply any symbols, because it would be very messy to conditionally define the default allocator library on toolchains depending on the platform.
9        "@platforms//os:windows": ["empty.cc"],
10        "//conditions:default": ["allocator_library.cc"],
11    }),
12    tags = ["manual"],
13    visibility = ["//visibility:public"],
14)
15