From 190bea8183da3fe02ac09b206a13e07b48591072 Mon Sep 17 00:00:00 2001 From: Scott Wolchok Date: Tue, 11 Feb 2025 16:29:02 -0800 Subject: [PATCH] Update [ghstack-poisoned] --- build/build_variables.bzl | 13 ++++++++----- runtime/platform/targets.bzl | 8 ++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/build/build_variables.bzl b/build/build_variables.bzl index d9ac0f40e3d..06da88a3056 100644 --- a/build/build_variables.bzl +++ b/build/build_variables.bzl @@ -19,6 +19,13 @@ PROGRAM_NO_PRIM_OPS_SRCS = [ "tensor_parser_exec_aten.cpp", ] +PLATFORM_SRCS = [ + "abort.cpp", + "log.cpp", + "profiler.cpp", + "runtime.cpp", +] + EXECUTORCH_CORE_SRCS = sorted([ "runtime/backend/interface.cpp", "runtime/core/evalue.cpp", @@ -28,13 +35,9 @@ EXECUTORCH_CORE_SRCS = sorted([ "runtime/core/tag.cpp", "runtime/executor/tensor_parser_portable.cpp", "runtime/kernel/operator_registry.cpp", - "runtime/platform/abort.cpp", "runtime/platform/default/posix.cpp", - "runtime/platform/log.cpp", - "runtime/platform/profiler.cpp", - "runtime/platform/runtime.cpp", "schema/extended_header.cpp", -] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS]) +] + ["runtime/executor/" + x for x in PROGRAM_NO_PRIM_OPS_SRCS] + ["runtime/platform/" + x for x in PLATFORM_SRCS]) PORTABLE_KERNELS_SRCS = [ "kernels/portable/cpu/op__empty_dim_order.cpp", diff --git a/runtime/platform/targets.bzl b/runtime/platform/targets.bzl index 42bb851e2cf..abb64b9bfd3 100644 --- a/runtime/platform/targets.bzl +++ b/runtime/platform/targets.bzl @@ -1,3 +1,4 @@ +load("@fbsource//xplat/executorch/build:build_variables.bzl", "PLATFORM_SRCS") load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") load(":log.bzl", "get_et_logging_flags") @@ -69,12 +70,7 @@ def define_common_targets(): "profiler.h", "runtime.h", ], - srcs = [ - "abort.cpp", - "log.cpp", - "profiler.cpp", - "runtime.cpp", - ], + srcs = PLATFORM_SRCS, exported_preprocessor_flags = get_profiling_flags() + get_et_logging_flags(), exported_deps = [ "//executorch/runtime/platform:pal_interface",