Skip to content

Commit

Permalink
fix(//cpp/trtorchc): Support building trtorchc with the pre_cxx11_abi
Browse files Browse the repository at this point in the history
for libtrtorch building with --config=pre_cxx11_abi

Signed-off-by: Naren Dasan <naren@narendasan.com>
Signed-off-by: Naren Dasan <narens@nvidia.com>
  • Loading branch information
narendasan committed Jul 8, 2020
1 parent 58006ba commit 172d4d5
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions cpp/trtorchc/BUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
package(default_visibility = ["//visibility:public"])

config_setting(
name = "use_pre_cxx11_abi",
values = {
"define": "abi=pre_cxx11_abi",
}
)

cc_binary(
name = "trtorchc",
srcs = [
"main.cpp"
],
deps = [
"@libtorch//:libtorch",
"@libtorch//:caffe2",
"//third_party/args",
"//cpp/api:trtorch"
],
)
] + select({
":use_pre_cxx11_abi": [
"@libtorch_pre_cxx11_abi//:libtorch",
"@libtorch_pre_cxx11_abi//:caffe2",
],
"//conditions:default": [
"@libtorch//:libtorch",
"@libtorch//:caffe2",
],
}),
)

0 comments on commit 172d4d5

Please sign in to comment.