-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.relic
executable file
·66 lines (63 loc) · 1.38 KB
/
BUILD.relic
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
57
58
59
60
61
62
63
64
65
66
load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake")
config_setting(
name = "macos",
constraint_values = [
"@platforms//os:macos",
],
visibility = ["//visibility:public"],
)
filegroup(
name = "src",
srcs = glob(["**"]),
visibility = ["//visibility:public"]
)
cmake(
name = "relic",
cache_entries = select({
"@platforms//cpu:aarch64": {
"CMAKE_INSTALL_LIBDIR": "lib",
"MULTI": "PTHREAD",
"WSIZE": "64",
"STLIB": "off",
},
"@platforms//cpu:x86_64": {
"CMAKE_INSTALL_LIBDIR": "lib",
"MULTI": "PTHREAD",
"WSIZE": "64",
"STLIB": "off",
},
"@platforms//cpu:i386": {
"CMAKE_INSTALL_LIBDIR": "lib",
"MULTI": "PTHREAD",
"WSIZE": "32",
"STLIB": "off",
},
"@platforms//cpu:arm": {
"CMAKE_INSTALL_LIBDIR": "lib",
"MULTI": "PTHREAD",
"WSIZE": "32",
"STLIB": "off",
},
"//conditions:default": {
"CMAKE_INSTALL_LIBDIR": "lib",
"MULTI": "PTHREAD",
"WSIZE": "32",
"STLIB": "off",
},
}),
build_args = [
"-j4",
],
linkopts = [
"-lpthread",
],
includes = ["include"],
lib_source = ":src",
#out_include_dir = "include/relic",
#out_static_libs = ["librelic_s.a"],
out_shared_libs = select({
":macos": ["librelic.dylib"],
"//conditions:default": ["librelic.so"]
}),
visibility = ["//visibility:public"],
)