Skip to content

Commit 970679a

Browse files
committed
build_variables.bzl: split PLATFORM_SRCS from EXECUTORCH_CORE_SRCS
Making the structure in this file mirror buck's worldview more closely when it makes sense. #8268 ghstack-source-id: 89544c6 ghstack-comment-id: 2652360999 Pull Request resolved: #8398
1 parent 6d1bc46 commit 970679a

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

build/build_variables.bzl

+8-5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ PROGRAM_NO_PRIM_OPS_SRCS = [
3939
"tensor_parser_exec_aten.cpp",
4040
]
4141

42+
PLATFORM_SRCS = [
43+
"abort.cpp",
44+
"log.cpp",
45+
"profiler.cpp",
46+
"runtime.cpp",
47+
]
48+
4249
EXECUTORCH_CORE_SRCS = sorted([
4350
"runtime/backend/interface.cpp",
4451
"runtime/core/evalue.cpp",
@@ -49,13 +56,9 @@ EXECUTORCH_CORE_SRCS = sorted([
4956
"runtime/core/tensor_layout.cpp",
5057
"runtime/executor/tensor_parser_portable.cpp",
5158
"runtime/kernel/operator_registry.cpp",
52-
"runtime/platform/abort.cpp",
5359
"runtime/platform/default/posix.cpp",
54-
"runtime/platform/log.cpp",
55-
"runtime/platform/profiler.cpp",
56-
"runtime/platform/runtime.cpp",
5760
"schema/extended_header.cpp",
58-
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS])
61+
] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS] + ["runtime/platform/" + x for x in PLATFORM_SRCS])
5962

6063
PORTABLE_KERNELS_SRCS = [
6164
"kernels/portable/cpu/op__empty_dim_order.cpp",

runtime/platform/targets.bzl

+2-6
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

@@ -69,12 +70,7 @@ def define_common_targets():
6970
"profiler.h",
7071
"runtime.h",
7172
],
72-
srcs = [
73-
"abort.cpp",
74-
"log.cpp",
75-
"profiler.cpp",
76-
"runtime.cpp",
77-
],
73+
srcs = PLATFORM_SRCS,
7874
exported_preprocessor_flags = get_profiling_flags() + get_et_logging_flags(),
7975
exported_deps = [
8076
"//executorch/runtime/platform:pal_interface",

0 commit comments

Comments
 (0)