diff --git a/examples/xnnpack/executor_runner/TARGETS b/examples/xnnpack/executor_runner/TARGETS new file mode 100644 index 00000000000..2341af9282f --- /dev/null +++ b/examples/xnnpack/executor_runner/TARGETS @@ -0,0 +1,8 @@ +# Any targets that should be shared between fbcode and xplat must be defined in +# targets.bzl. This file can contain fbcode-only targets. + +load(":targets.bzl", "define_common_targets") + +oncall("executorch") + +define_common_targets() diff --git a/examples/xnnpack/executor_runner/targets.bzl b/examples/xnnpack/executor_runner/targets.bzl new file mode 100644 index 00000000000..f9c333d5b47 --- /dev/null +++ b/examples/xnnpack/executor_runner/targets.bzl @@ -0,0 +1,20 @@ +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_oss_build_kwargs", "runtime") + +def define_common_targets(): + """Defines targets that should be shared between fbcode and xplat. + + The directory containing this targets.bzl file should also contain both + TARGETS and BUCK files that call this function. + """ + + # executor_runner for XNNPACK Backend and portable kernels. + runtime.cxx_binary( + name = "xnn_executor_runner", + deps = [ + "//executorch/examples/portable/executor_runner:executor_runner_lib", + "//executorch/backends/xnnpack:xnnpack_backend", + "//executorch/kernels/portable:generated_lib", + ], + define_static_target = True, + **get_oss_build_kwargs() + )