xref: /aosp_15_r20/external/tink/cc/integration/awskms/third_party/aws_checksums.BUILD.bazel (revision e7b1675dde1b92d52ec075b0a92829627f2c52a5)
1licenses(["notice"])  # Apache 2.0
2
3cc_library(
4    name = "aws_checksums",
5    srcs = glob([
6        "source/*.c",
7    ]) + select({
8        "@platforms//cpu:x86_64": glob(["source/intel/*.c"]),
9        "@platforms//cpu:aarch64": glob(["source/arm/*.c"]),
10        "//conditions:default": ["@platforms//:incompatible"],
11    }),
12    hdrs = glob([
13        "include/**/*.h"
14    ]),
15    includes = [
16        "include/",
17    ],
18    copts = [
19        "-O2" # Note there is some issue with the assembly implementation and GCC, therefore this should always be compiled with -O (https://github.com/awslabs/aws-checksums/issues/8)
20    ],
21    deps = [
22        "@aws_c_common",
23    ],
24    visibility = ["//visibility:public"],
25)
26