forked from google-deepmind/lab2d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD
80 lines (70 loc) · 2.1 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Description:
# DeepMind reinforcement learning APIs.
load("@rules_license//rules:license.bzl", "license")
package(default_applicable_licenses = ["//third_party/rl_api:license"])
license(
name = "license",
package_name = "rl_api",
license_kinds = [],
)
licenses(["notice"])
exports_files(["LICENSE"])
cc_library(
name = "env_c_api",
hdrs = ["env_c_api.h"],
visibility = ["//visibility:public"],
)
cc_library(
name = "env_c_api_test_suite",
testonly = 1,
srcs = ["env_c_api_test_suite.cc"],
hdrs = ["env_c_api_test_suite.h"],
visibility = ["//visibility:public"],
deps = [
":env_c_api",
"@com_google_absl//absl/log",
"@com_google_googletest//:gtest",
],
alwayslink = 1, # contains test definitions
)
cc_library(
name = "env_c_api_bind",
hdrs = ["env_c_api_bind.h"],
visibility = ["//visibility:public"],
deps = [":env_c_api"],
)
cc_binary(
name = "libenv_c_api_example.so",
testonly = 1,
srcs = ["env_c_api_example.cc"],
linkopts = select({
"@platforms//os:linux": ["-Wl,--version-script=$(location :env_c_api_example.lds)"],
"@platforms//os:android": ["-Wl,--version-script=$(location :env_c_api_example.lds)"],
"@platforms//os:freebsd": ["-Wl,--version-script=$(location :env_c_api_example.lds)"],
"@platforms//os:netbsd": ["-Wl,--version-script=$(location :env_c_api_example.lds)"],
"@platforms//os:openbsd": ["-Wl,--version-script=$(location :env_c_api_example.lds)"],
"@platforms//os:macos": ["-Wl,-exported_symbols_list,$(location :env_c_api_example.syms.lds)"],
"//conditions:default": [],
}),
linkshared = 1,
linkstatic = 1,
deps = [
":env_c_api",
":env_c_api_bind",
":env_c_api_example.lds",
":env_c_api_example.syms.lds",
],
)
cc_test(
name = "env_c_api_example_test",
size = "small",
srcs = [
"env_c_api_example.h",
"env_c_api_example_test.cc",
"libenv_c_api_example.so",
],
deps = [
":env_c_api",
"@com_google_googletest//:gtest_main",
],
)