Skip to content

Commit 4a1cbac

Browse files
authored
build_variables.bzl: split PROGRAM_NO_PRIM_OPS_SRCS from EXECUTORCH_CORE_SRCS (#8397)
Making the structure in this file mirror buck's worldview more closely when it makes sense. #8268 Differential Revision: [D80187446](https://our.internmc.facebook.com/intern/diff/D80187446)
1 parent 2c0752a commit 4a1cbac

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

runtime/executor/targets.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
load("@fbsource//xplat/executorch/build:build_variables.bzl", "PROGRAM_NO_PRIM_OPS_SRCS")
12
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "get_aten_mode_options", "runtime")
23

34
def _program_preprocessor_flags():
@@ -93,11 +94,7 @@ def define_common_targets():
9394

9495
runtime.cxx_library(
9596
name = "program_no_prim_ops" + aten_suffix,
96-
srcs = [
97-
"method.cpp",
98-
"method_meta.cpp",
99-
"program.cpp",
100-
"tensor_parser_exec_aten.cpp",
97+
srcs = PROGRAM_NO_PRIM_OPS_SRCS + [
10198
"tensor_parser{}.cpp".format(aten_suffix if aten_mode else "_portable"),
10299
],
103100
headers = [

shim_et/xplat/executorch/build/build_variables.bzl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,31 @@ EXECUTORCH_SRCS = [
3232
"kernels/prim_ops/register_prim_ops.cpp",
3333
]
3434

35-
EXECUTORCH_CORE_SRCS = [
35+
PROGRAM_NO_PRIM_OPS_SRCS = [
36+
"method.cpp",
37+
"method_meta.cpp",
38+
"program.cpp",
39+
"tensor_parser_exec_aten.cpp",
40+
]
41+
42+
EXECUTORCH_CORE_SRCS = sorted([
3643
"runtime/backend/interface.cpp",
3744
"runtime/core/evalue.cpp",
3845
"runtime/core/exec_aten/util/tensor_shape_to_c_string.cpp",
3946
"runtime/core/exec_aten/util/tensor_util_portable.cpp",
4047
"runtime/core/portable_type/tensor_impl.cpp",
4148
"runtime/core/tag.cpp",
4249
"runtime/core/tensor_layout.cpp",
43-
"runtime/executor/method.cpp",
44-
"runtime/executor/method_meta.cpp",
45-
"runtime/executor/program.cpp",
46-
"runtime/executor/pte_data_map.cpp",
47-
"runtime/executor/tensor_parser_exec_aten.cpp",
4850
"runtime/executor/tensor_parser_portable.cpp",
51+
"runtime/executor/pte_data_map.cpp",
4952
"runtime/kernel/operator_registry.cpp",
5053
"runtime/platform/abort.cpp",
5154
"runtime/platform/log.cpp",
5255
"runtime/platform/platform.cpp",
5356
"runtime/platform/profiler.cpp",
5457
"runtime/platform/runtime.cpp",
5558
"schema/extended_header.cpp",
56-
]
59+
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS])
5760

5861
PORTABLE_KERNELS_SRCS = [
5962
"kernels/portable/cpu/op__clone_dim_order.cpp",

0 commit comments

Comments
 (0)