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 for aten_mode in (True, False): 11*523fa7a6SAndroid Build Coastguard Worker aten_suffix = ("_aten" if aten_mode else "") 12*523fa7a6SAndroid Build Coastguard Worker runtime.cxx_library( 13*523fa7a6SAndroid Build Coastguard Worker name = "runtime" + aten_suffix, 14*523fa7a6SAndroid Build Coastguard Worker srcs = ["bundled_program.cpp"], 15*523fa7a6SAndroid Build Coastguard Worker exported_headers = ["bundled_program.h"], 16*523fa7a6SAndroid Build Coastguard Worker visibility = [ 17*523fa7a6SAndroid Build Coastguard Worker "//executorch/...", 18*523fa7a6SAndroid Build Coastguard Worker "@EXECUTORCH_CLIENTS", 19*523fa7a6SAndroid Build Coastguard Worker ], 20*523fa7a6SAndroid Build Coastguard Worker deps = [ 21*523fa7a6SAndroid Build Coastguard Worker "//executorch/runtime/core/exec_aten/util:dim_order_util" + aten_suffix, 22*523fa7a6SAndroid Build Coastguard Worker "//executorch/devtools/bundled_program/schema:bundled_program_schema_fbs", 23*523fa7a6SAndroid Build Coastguard Worker ], 24*523fa7a6SAndroid Build Coastguard Worker exported_deps = [ 25*523fa7a6SAndroid Build Coastguard Worker "//executorch/runtime/core:memory_allocator", 26*523fa7a6SAndroid Build Coastguard Worker "//executorch/runtime/executor:program" + aten_suffix, 27*523fa7a6SAndroid Build Coastguard Worker ], 28*523fa7a6SAndroid Build Coastguard Worker ) 29