fork/rules_rust

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

UebelAndreReplaced `crates_universe` rule with `crates_repository` (#1158)59fab4e7

0.8.1
704 B25 linesraw
1load("@rules_cc//cc:defs.bzl", "cc_library")
2
3cc_library(
4    name = "zlib",
5    srcs = glob(["*.c"]),
6    hdrs = glob(["*.h"]),
7    # Use -Dverbose=-1 to turn off zlib's trace logging.
8    # https://github.com/bazelbuild/bazel/issues/3280
9    copts = select({
10        "@platforms//os:linux": [
11            "-w",
12            "-Dverbose=-1",
13            # Required for opt builds to avoid
14            # `libzlib.a(crc32.o): requires unsupported dynamic reloc 11; recompile with -fPIC`
15            "-fPIC",
16        ],
17        "//conditions:default": [
18            "-w",
19            "-Dverbose=-1",
20        ],
21    }),
22    includes = ["."],
23    linkstatic = True,
24    visibility = ["//visibility:public"],
25)