Skip to content

Commit 253b155

Browse files
committed
Add jni_layer_runtime.cpp to JNI targets and sources
1 parent dceb3e2 commit 253b155

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

extension/android/jni/BUCK

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ non_fbcode_target(_kind = executorch_generated_lib,
2828

2929
non_fbcode_target(_kind = fb_android_cxx_library,
3030
name = "executorch_jni",
31-
srcs = ["jni_layer.cpp", "log.cpp"],
31+
srcs = ["jni_layer.cpp", "log.cpp", "jni_layer_runtime.cpp"],
3232
allow_jni_merging = False,
3333
compiler_flags = ET_JNI_COMPILER_FLAGS,
3434
soname = "libexecutorch.$(ext)",
@@ -49,7 +49,7 @@ non_fbcode_target(_kind = fb_android_cxx_library,
4949

5050
non_fbcode_target(_kind = fb_android_cxx_library,
5151
name = "executorch_jni_full",
52-
srcs = ["jni_layer.cpp", "log.cpp"],
52+
srcs = ["jni_layer.cpp", "log.cpp", "jni_layer_runtime.cpp"],
5353
allow_jni_merging = False,
5454
compiler_flags = ET_JNI_COMPILER_FLAGS,
5555
soname = "libexecutorch.$(ext)",
@@ -74,6 +74,7 @@ non_fbcode_target(_kind = fb_android_cxx_library,
7474
srcs = [
7575
"jni_layer.cpp",
7676
"jni_layer_llama.cpp",
77+
"jni_layer_runtime.cpp",
7778
],
7879
allow_jni_merging = False,
7980
compiler_flags = ET_JNI_COMPILER_FLAGS + [
@@ -113,6 +114,10 @@ runtime.export_file(
113114
name = "jni_layer.cpp",
114115
)
115116

117+
runtime.export_file(
118+
name = "jni_layer_runtime.cpp",
119+
)
120+
116121
runtime.cxx_library(
117122
name = "jni_headers",
118123
exported_headers = [

extension/android/jni/selective_jni.buck.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ load("@fbsource//xplat/executorch/backends/xnnpack/third-party:third_party_libs.
44
load("@fbsource//xplat/executorch/extension/android/jni:build_defs.bzl", "ET_JNI_COMPILER_FLAGS")
55

66
def selective_jni_target(name, deps, srcs = [], soname = "libexecutorch.$(ext)"):
7-
non_fbcode_target(_kind = fb_android_cxx_library,
7+
non_fbcode_target(
8+
_kind = fb_android_cxx_library,
89
name = name,
910
srcs = [
1011
"//xplat/executorch/extension/android/jni:jni_layer.cpp",
12+
"//xplat/executorch/extension/android/jni:jni_layer_runtime.cpp",
1113
] + srcs,
1214
allow_jni_merging = False,
1315
compiler_flags = ET_JNI_COMPILER_FLAGS,

0 commit comments

Comments
 (0)