forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpfm.BUILD
More file actions
39 lines (34 loc) · 1.03 KB
/
pfm.BUILD
File metadata and controls
39 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@rules_foreign_cc//foreign_cc:defs.bzl", "make_variant")
filegroup(
name = "sources",
srcs = glob(["**"]),
)
make_variant(
name = "pfm",
copts = ["-w"],
lib_name = "libpfm",
lib_source = ":sources",
target_compatible_with = select({
"@platforms//os:linux": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
visibility = ["//visibility:private"],
)
alias(
name = "pfm_external",
actual = "@pfm//:pfm_",
visibility = ["//visibility:public"],
)
cc_library(
name = "pfm_system",
linkopts = ["-lpfm"],
target_compatible_with = select({
"@platforms//os:linux": [],
"//conditions:default": ["@platforms//:incompatible"],
}),
visibility = ["//visibility:public"],
)