xref: /aosp_15_r20/external/executorch/extension/pytree/aten_util/targets.bzl (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2
3def define_common_targets():
4    """Defines targets that should be shared between fbcode and xplat.
5
6    The directory containing this targets.bzl file should also contain both
7    TARGETS and BUCK files that call this function.
8    """
9
10    runtime.cxx_library(
11        name = "ivalue_util",
12        srcs = ["ivalue_util.cpp"],
13        exported_headers = ["ivalue_util.h"],
14        visibility = [
15            "//executorch/...",
16            "@EXECUTORCH_CLIENTS",
17        ],
18        exported_deps = [
19            "//executorch/extension/pytree:pytree",
20            "//executorch/runtime/platform:platform",
21        ],
22        compiler_flags = ["-Wno-missing-prototypes"],
23        fbcode_deps = [
24            "//caffe2:ATen-core",
25            "//caffe2:ATen-cpu",
26            "//caffe2/c10:c10",
27        ],
28        xplat_deps = [
29            "//xplat/caffe2:torch_mobile_core",
30            "//xplat/caffe2/c10:c10",
31        ],
32    )
33