1# Any targets that should be shared between fbcode and xplat must be defined in 2# targets.bzl. This file can contain fbcode-only targets. 3 4load("@fbcode_macros//build_defs:cpp_python_extension.bzl", "cpp_python_extension") 5load("@fbcode_macros//build_defs:python_library.bzl", "python_library") 6load(":targets.bzl", "define_common_targets") 7 8oncall("executorch") 9 10define_common_targets() 11 12cpp_python_extension( 13 name = "pybindings", 14 srcs = [ 15 "pybindings.cpp", 16 ], 17 base_module = "executorch.extension.pytree", 18 deps = [ 19 ":pytree", 20 ], 21 external_deps = [ 22 "pybind11", 23 ], 24) 25 26cpp_python_extension( 27 name = "pybindings_debug", 28 srcs = [ 29 "pybindings.cpp", 30 ], 31 base_module = "executorch.extension.pytree", 32 deps = [ 33 ":pytree", 34 ], 35 external_deps = [ 36 "pybind11", 37 ], 38) 39 40python_library( 41 name = "pylib", 42 srcs = [ 43 "__init__.py", 44 ], 45 base_module = "executorch.extension.pytree", 46 deps = [ 47 ":pybindings", 48 "//caffe2:torch", 49 ], 50) 51