forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpuinfo.BUILD
56 lines (54 loc) · 1.08 KB
/
cpuinfo.BUILD
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "clog",
srcs = [
"deps/clog/src/clog.c",
],
hdrs = glob([
"deps/clog/include/*.h",
]),
includes = [
"deps/clog/include/",
],
linkstatic = True,
visibility = ["//visibility:public"],
)
cc_library(
name = "cpuinfo",
srcs = glob(
[
"src/*.c",
"src/linux/*.c",
"src/x86/*.c",
"src/x86/cache/*.c",
"src/x86/linux/*.c",
],
exclude = [
"src/x86/mockcpuid.c",
"src/linux/mockfile.c",
],
),
hdrs = glob([
"include/*.h",
"src/*.h",
"src/cpuinfo/*.h",
"src/include/*.h",
"src/x86/*.h",
"src/x86/linux/*.h",
"src/linux/*.h",
]),
copts = [
"-DCPUINFO_LOG_LEVEL=2",
"-DTH_BLAS_MKL",
"-D_GNU_SOURCE=1",
],
includes = [
"include",
"src",
],
linkstatic = True,
visibility = ["//visibility:public"],
deps = [
":clog",
],
)