brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · dba7464 Raw
40 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-exception4 5load("@rules_foreign_cc//foreign_cc:defs.bzl", "make_variant")6 7filegroup(8    name = "sources",9    srcs = glob(["**"]),10)11 12make_variant(13    name = "pfm",14    copts = ["-w"],15    lib_name = "libpfm",16    lib_source = ":sources",17    target_compatible_with = select({18        "@platforms//os:linux": [],19        "//conditions:default": ["@platforms//:incompatible"],20    }),21    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",22    visibility = ["//visibility:private"],23)24 25alias(26    name = "pfm_external",27    actual = "@pfm//:pfm_",28    visibility = ["//visibility:public"],29)30 31cc_library(32    name = "pfm_system",33    linkopts = ["-lpfm"],34    target_compatible_with = select({35        "@platforms//os:linux": [],36        "//conditions:default": ["@platforms//:incompatible"],37    }),38    visibility = ["//visibility:public"],39)40