diff --git a/cpp/trtorchc/BUILD b/cpp/trtorchc/BUILD index 7fa89836f5..3908892f9b 100644 --- a/cpp/trtorchc/BUILD +++ b/cpp/trtorchc/BUILD @@ -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", + ], + }), +) \ No newline at end of file