Skip to content

Commit 035d25c

Browse files
authored
build_variables.bzl: split PLATFORM_SRCS from EXECUTORCH_CORE_SRCS (#8398)
Making the structure in this file mirror buck's worldview more closely when it makes sense. #8268
1 parent c0c2982 commit 035d25c

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

runtime/platform/targets.bzl

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

@@ -73,13 +74,7 @@ def define_common_targets():
7374
"runtime.h",
7475
"compat_unistd.h",
7576
],
76-
srcs = [
77-
"abort.cpp",
78-
"log.cpp",
79-
"platform.cpp",
80-
"profiler.cpp",
81-
"runtime.cpp",
82-
],
77+
srcs = PLATFORM_SRCS,
8378
exported_preprocessor_flags = get_profiling_flags() + get_et_logging_flags(),
8479
exported_deps = [
8580
"//executorch/runtime/platform:pal_interface",

shim_et/xplat/executorch/build/build_variables.bzl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ PROGRAM_NO_PRIM_OPS_SRCS = [
3939
"tensor_parser_exec_aten.cpp",
4040
]
4141

42+
PLATFORM_SRCS = [
43+
"abort.cpp",
44+
"log.cpp",
45+
"platform.cpp",
46+
"profiler.cpp",
47+
"runtime.cpp",
48+
]
49+
4250
EXECUTORCH_CORE_SRCS = sorted([
4351
"runtime/backend/interface.cpp",
4452
"runtime/core/evalue.cpp",
@@ -50,13 +58,8 @@ EXECUTORCH_CORE_SRCS = sorted([
5058
"runtime/executor/tensor_parser_portable.cpp",
5159
"runtime/executor/pte_data_map.cpp",
5260
"runtime/kernel/operator_registry.cpp",
53-
"runtime/platform/abort.cpp",
54-
"runtime/platform/log.cpp",
55-
"runtime/platform/platform.cpp",
56-
"runtime/platform/profiler.cpp",
57-
"runtime/platform/runtime.cpp",
5861
"schema/extended_header.cpp",
59-
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS])
62+
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS] + ["runtime/platform/" + x for x in PLATFORM_SRCS])
6063

6164
PORTABLE_KERNELS_SRCS = [
6265
"kernels/portable/cpu/op__clone_dim_order.cpp",

0 commit comments

Comments
 (0)