File tree Expand file tree Collapse file tree 5 files changed +52
-0
lines changed
extension/flat_tensor/serialize Expand file tree Collapse file tree 5 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+ load(":targets.bzl", "define_common_targets")
3+
4+ oncall("executorch")
5+
6+ define_common_targets()
7+
8+ runtime.python_library(
9+ name = "schema",
10+ srcs = [
11+ "flat_tensor_schema.py",
12+ ],
13+ visibility = [
14+ "//executorch/...",
15+ ],
16+ )
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
2+
3+ def define_common_targets ():
4+ runtime .genrule (
5+ name = "gen_schema" ,
6+ srcs = [
7+ "flat_tensor.fbs" ,
8+ "scalar_type.fbs" ,
9+ ],
10+ outs = {
11+ "schema_generated.h" : ["flat_tensor_generated.h" ],
12+ "scalar_type_generated.h" : ["scalar_type_generated.h" ]
13+ },
14+ cmd = " " .join ([
15+ "$(exe {})" .format (runtime .external_dep_location ("flatc" )),
16+ "--cpp" ,
17+ "--cpp-std c++11" ,
18+ "--scoped-enums" ,
19+ "-o ${OUT}" ,
20+ "${SRCS}" ,
21+ ]),
22+ default_outs = ["." ],
23+ )
24+
25+ runtime .cxx_library (
26+ name = "generated_headers" ,
27+ srcs = [],
28+ visibility = [
29+ "//executorch/..." ,
30+ ],
31+ exported_headers = {
32+ "schema_generated.h" : ":gen_schema[schema_generated.h]" ,
33+ "scalar_type_generated.h" : ":gen_schema[scalar_type_generated.h]" ,
34+ },
35+ exported_external_deps = ["flatbuffers-api" ],
36+ )
You can’t perform that action at this time.
0 commit comments