brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 89da165 Raw
45 lines · plain
1# This file is licensed under the Apache License v2.0 with LLVM Exceptions.2# See https://llvm.org/LICENSE.txt for license information.3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception4load("@rules_cc//cc:cc_library.bzl", "cc_library")5 6package(7    default_visibility = ["//visibility:public"],8    # BSD/MIT-like license (for zstd)9    licenses = ["notice"],10)11 12cc_library(13    name = "zstd",14    srcs = select({15        "@llvm-project//third-party:llvm_zstd_enabled": glob([16            "lib/common/*.c",17            "lib/common/*.h",18            "lib/compress/*.c",19            "lib/compress/*.h",20            "lib/decompress/*.c",21            "lib/decompress/*.h",22            "lib/decompress/*.S",23            "lib/dictBuilder/*.c",24            "lib/dictBuilder/*.h",25        ]),26        "//conditions:default": [],27    }),28    hdrs = select({29        "@llvm-project//third-party:llvm_zstd_enabled": [30            "lib/zdict.h",31            "lib/zstd.h",32            "lib/zstd_errors.h",33        ],34        "//conditions:default": [],35    }),36    defines = select({37        "@llvm-project//third-party:llvm_zstd_enabled": [38            "LLVM_ENABLE_ZSTD=1",39            "ZSTD_MULTITHREAD",40        ],41        "//conditions:default": [],42    }),43    strip_include_prefix = "lib",44)45