Skip to content

Commit f519ba6

Browse files
committed
Update on "[devtool] make datasink as a sepreate directory"
this diff make data_sink_base and its childrens as a seperate directory for better structure. Differential Revision: [D69732404](https://our.internmc.facebook.com/intern/diff/D69732404/) [ghstack-poisoned]
2 parents da34dbe + c775d67 commit f519ba6

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

devtools/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ add_custom_command(
176176
add_library(
177177
etdump ${CMAKE_CURRENT_SOURCE_DIR}/etdump/etdump_flatcc.cpp
178178
${CMAKE_CURRENT_SOURCE_DIR}/etdump/emitter.cpp
179-
${CMAKE_CURRENT_SOURCE_DIR}/etdump/buffer_data_sink.cpp
180-
${CMAKE_CURRENT_SOURCE_DIR}/etdump/buffer_data_sink.h
179+
${CMAKE_CURRENT_SOURCE_DIR}/etdump/data_sinks/buffer_data_sink.cpp
180+
${CMAKE_CURRENT_SOURCE_DIR}/etdump/data_sinks/buffer_data_sink.h
181181
)
182182

183183
target_link_libraries(
Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22

33

4+
def define_data_sink_target(data_sink_name, aten_suffix):
5+
runtime.cxx_library(
6+
name = data_sink_name + aten_suffix,
7+
exported_headers = [
8+
data_sink_name + ".h",
9+
],
10+
srcs = [
11+
data_sink_name + ".cpp",
12+
],
13+
deps = [
14+
"//executorch/devtools/etdump:utils",
15+
],
16+
exported_deps = [
17+
"//executorch/runtime/core/exec_aten:lib" + aten_suffix,
18+
":data_sink_base" + aten_suffix,
19+
],
20+
visibility = [
21+
"//executorch/...",
22+
"@EXECUTORCH_CLIENTS",
23+
],
24+
)
25+
426
def define_common_targets():
527
"""Defines targets that should be shared between fbcode and xplat.
628
@@ -24,23 +46,4 @@ def define_common_targets():
2446
],
2547
)
2648

27-
runtime.cxx_library(
28-
name = "buffer_data_sink" + aten_suffix,
29-
exported_headers = [
30-
"buffer_data_sink.h",
31-
],
32-
srcs = [
33-
"buffer_data_sink.cpp",
34-
],
35-
deps = [
36-
"//executorch/devtools/etdump:utils",
37-
],
38-
exported_deps = [
39-
"//executorch/runtime/core/exec_aten:lib" + aten_suffix,
40-
":data_sink_base" + aten_suffix,
41-
],
42-
visibility = [
43-
"//executorch/...",
44-
"@EXECUTORCH_CLIENTS",
45-
],
46-
)
49+
define_data_sink_target("buffer_data_sink", aten_suffix)

0 commit comments

Comments
 (0)