-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy pathBUILD
More file actions
84 lines (74 loc) · 1.59 KB
/
BUILD
File metadata and controls
84 lines (74 loc) · 1.59 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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
load("@emsdk//emscripten_toolchain:wasm_rules.bzl", "wasm_cc_binary")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
exports_files(["LICENSE"])
cc_library(
name = "robots",
srcs = [
"robots.cc",
],
hdrs = [
"robots.h",
],
deps = [
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/container:fixed_array",
"@abseil-cpp//absl/strings",
],
)
cc_library(
name = "reporting_robots",
srcs = ["reporting_robots.cc"],
hdrs = ["reporting_robots.h"],
deps = [
":robots",
"@abseil-cpp//absl/container:btree",
"@abseil-cpp//absl/strings",
],
)
cc_test(
name = "robots_test",
srcs = ["robots_test.cc"],
deps = [
":robots",
"@abseil-cpp//absl/strings",
"@googletest//:gtest_main",
],
)
cc_test(
name = "reporting_robots_test",
srcs = ["reporting_robots_test.cc"],
deps = [
":reporting_robots",
":robots",
"@abseil-cpp//absl/strings",
"@googletest//:gtest_main",
],
)
cc_binary(
name = "robots_main",
srcs = ["robots_main.cc"],
deps = [
":robots",
],
)
cc_binary(
name = "robots_js",
srcs = ["robots_wasm.cc"],
linkopts = [
"-l",
"embind",
"-s",
"EXPORTED_FUNCTIONS=_IsAllowed",
"-s",
"EXPORTED_RUNTIME_METHODS=ccall,cwrap",
],
deps = [
":robots",
],
)
wasm_cc_binary(
name = "robots_wasm",
cc_target = ":robots_js",
)