Skip to content

Commit d56559c

Browse files
Di Xu (SWE)facebook-github-bot
authored andcommitted
Remove offline compile resources from the production runtime target
Summary: Remove offline compile resources from the production runtime target - Including those x86 increased 50MB MWA app size: T208844791 Differential Revision: D66508062
1 parent 30d5a11 commit d56559c

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

backends/qualcomm/runtime/targets.bzl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def define_common_targets():
3535
],
3636
)
3737

38+
# TODO(T208857957): rename to aot_runtime
3839
runtime.cxx_library(
3940
name = "runtime",
4041
srcs = glob(
@@ -77,3 +78,43 @@ def define_common_targets():
7778
"//executorch/runtime/core:event_tracer",
7879
],
7980
)
81+
82+
runtime.cxx_library(
83+
name = "android_runtime",
84+
srcs = glob(
85+
[
86+
"*.cpp",
87+
"backends/*.cpp",
88+
"backends/htpbackend/*.cpp",
89+
"backends/htpbackend/aarch64/*.cpp",
90+
],
91+
exclude = ["Logging.cpp"],
92+
),
93+
exported_headers = glob(
94+
[
95+
"*.h",
96+
"backends/*.h",
97+
"backends/htpbackend/*.h",
98+
],
99+
exclude = ["Logging.h"],
100+
),
101+
define_static_target = True,
102+
link_whole = True, # needed for executorch/examples/models/llama:main to register QnnBackend
103+
platforms = [ANDROID],
104+
visibility = ["@EXECUTORCH_CLIENTS"],
105+
deps = [
106+
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
107+
":logging",
108+
"//executorch/backends/qualcomm:schema",
109+
"//executorch/backends/qualcomm:qc_binary_info_schema",
110+
"//executorch/backends/qualcomm/aot/ir:qcir_utils",
111+
"//executorch/backends/qualcomm/aot/wrappers:wrappers",
112+
"//executorch/runtime/backend:interface",
113+
"//executorch/runtime/core:core",
114+
"//executorch/extension/tensor:tensor",
115+
],
116+
exported_deps = [
117+
"//executorch/runtime/core/exec_aten/util:scalar_type_util",
118+
"//executorch/runtime/core:event_tracer",
119+
],
120+
)

backends/qualcomm/targets.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def define_common_targets():
120120
"fbsource//third-party/qualcomm/qnn/qnn-{0}:api".format(get_qnn_library_verision()),
121121
"//executorch/runtime/backend:interface",
122122
"//executorch/runtime/core:core",
123-
"//executorch/backends/qualcomm/runtime:runtime",
123+
"//executorch/backends/qualcomm/runtime:android_runtime",
124124
],
125125
exported_deps = [
126126
":schema",

0 commit comments

Comments
 (0)