• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load(
2    "@fbsource//tools/build_defs:default_platform_defs.bzl",
3    "ANDROID",
4)
5load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
6load("@fbsource//xplat/executorch/backends/qualcomm/qnn_version.bzl", "get_qnn_library_verision")
7
8def define_common_targets():
9    """Defines targets that should be shared between fbcode and xplat.
10
11    The directory containing this targets.bzl file should also contain both
12    TARGETS and BUCK files that call this function.
13    """
14    runtime.cxx_library(
15        name = "wrappers",
16        srcs = glob([
17            "*.cpp",
18        ]),
19        exported_headers = glob([
20            "*.h",
21        ]),
22        define_static_target = True,
23        platforms = [ANDROID],
24        visibility = ["@EXECUTORCH_CLIENTS"],
25        deps = [
26            "fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
27            "//executorch/runtime/backend:interface",
28            "//executorch/runtime/core:core",
29        ],
30        exported_deps = [
31            "//executorch/backends/qualcomm/runtime:logging",
32        ],
33    )
34