1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") 2load("@fbcode_macros//build_defs:export_files.bzl", "export_file") 3 4def define_common_targets(): 5 """Defines targets that should be shared between fbcode and xplat. 6 The directory containing this targets.bzl file should also contain both 7 TARGETS and BUCK files that call this function. 8 """ 9 10 export_file( 11 name = "qc_compiler_spec_schema", 12 src = "qc_compiler_spec.fbs", 13 visibility = ["//executorch/backends/qualcomm/serialization/..."], 14 ) 15 16 runtime.python_library( 17 name = "serialization", 18 srcs = glob([ 19 "*.py", 20 ]), 21 resources = { 22 ":qc_compiler_spec_schema": "qc_compiler_spec.fbs", 23 }, 24 visibility = [ 25 "@EXECUTORCH_CLIENTS", 26 ], 27 deps = [ 28 "//executorch/exir/backend:backend_details", 29 "//executorch/exir/backend:compile_spec_schema", 30 ], 31 ) 32