Skip to content

Commit 172d4d5

Browse files
committed
fix(//cpp/trtorchc): Support building trtorchc with the pre_cxx11_abi
for libtrtorch building with --config=pre_cxx11_abi Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 58006ba commit 172d4d5

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Diff for: cpp/trtorchc/BUILD

+18-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
package(default_visibility = ["//visibility:public"])
22

3+
config_setting(
4+
name = "use_pre_cxx11_abi",
5+
values = {
6+
"define": "abi=pre_cxx11_abi",
7+
}
8+
)
9+
310
cc_binary(
411
name = "trtorchc",
512
srcs = [
613
"main.cpp"
714
],
815
deps = [
9-
"@libtorch//:libtorch",
10-
"@libtorch//:caffe2",
1116
"//third_party/args",
1217
"//cpp/api:trtorch"
13-
],
14-
)
18+
] + select({
19+
":use_pre_cxx11_abi": [
20+
"@libtorch_pre_cxx11_abi//:libtorch",
21+
"@libtorch_pre_cxx11_abi//:caffe2",
22+
],
23+
"//conditions:default": [
24+
"@libtorch//:libtorch",
25+
"@libtorch//:caffe2",
26+
],
27+
}),
28+
)

0 commit comments

Comments
 (0)