-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy pathBUILD
55 lines (49 loc) · 1.11 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
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
package(default_visibility = ["//visibility:public"])
config_setting(
name = "use_pre_cxx11_abi",
values = {
"define": "abi=pre_cxx11_abi",
},
)
config_setting(
name = "python_core",
values = {
"define": "target_lang=python",
},
)
config_setting(
name = "windows",
constraint_values = [
"@platforms//os:windows",
],
)
cc_library(
name = "core",
srcs = [
"compiler.cpp",
],
hdrs = [
"compiler.h",
],
deps = [
"//core/conversion",
"//core/lowering",
"//core/partitioning",
"//core/runtime",
"//core/util/logging",
] + select({
":windows": ["@tensorrt_win//:nvinfer", "@libtorch_win//:libtorch"],
":use_pre_cxx11_abi": ["@tensorrt//:nvinfer", "@libtorch_pre_cxx11_abi//:libtorch"],
"//conditions:default": ["@tensorrt//:nvinfer", "@libtorch"],
}),
alwayslink = True,
)
pkg_tar(
name = "include",
srcs = [
"compiler.h",
],
package_dir = "core/",
)