fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

Daniel Wagner-HallSet up default allocator_library and global_allocator_library (#2172)aa4b3a86

cleanup
608 B14 linesraw
1load("@rules_cc//cc:defs.bzl", "cc_library")
2
3cc_library(
4    name = "global_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": ["global_allocator_library.cc"],
11    }),
12    tags = ["manual"],
13    visibility = ["//visibility:public"],
14)