xref: /aosp_15_r20/external/executorch/util/targets.bzl (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1*523fa7a6SAndroid Build Coastguard Workerload("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2*523fa7a6SAndroid Build Coastguard Worker
3*523fa7a6SAndroid Build Coastguard Workerdef define_common_targets():
4*523fa7a6SAndroid Build Coastguard Worker    """Defines targets that should be shared between fbcode and xplat.
5*523fa7a6SAndroid Build Coastguard Worker
6*523fa7a6SAndroid Build Coastguard Worker    The directory containing this targets.bzl file should also contain both
7*523fa7a6SAndroid Build Coastguard Worker    TARGETS and BUCK files that call this function.
8*523fa7a6SAndroid Build Coastguard Worker    """
9*523fa7a6SAndroid Build Coastguard Worker
10*523fa7a6SAndroid Build Coastguard Worker    if not runtime.is_oss:
11*523fa7a6SAndroid Build Coastguard Worker        runtime.python_library(
12*523fa7a6SAndroid Build Coastguard Worker            name = "python_profiler",
13*523fa7a6SAndroid Build Coastguard Worker            srcs = [
14*523fa7a6SAndroid Build Coastguard Worker                "python_profiler.py",
15*523fa7a6SAndroid Build Coastguard Worker            ],
16*523fa7a6SAndroid Build Coastguard Worker            deps = [
17*523fa7a6SAndroid Build Coastguard Worker                "fbsource//third-party/pypi/snakeviz:snakeviz",
18*523fa7a6SAndroid Build Coastguard Worker                "fbsource//third-party/pypi/tornado:tornado",
19*523fa7a6SAndroid Build Coastguard Worker            ],
20*523fa7a6SAndroid Build Coastguard Worker            visibility = ["@EXECUTORCH_CLIENTS"],
21*523fa7a6SAndroid Build Coastguard Worker            _is_external_target = True,
22*523fa7a6SAndroid Build Coastguard Worker        )
23