Skip to content

Commit cd7d5c3

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Android build fix (#2753)
Summary: Should use selective build for optimized. Pull Request resolved: #2753 Reviewed By: cccclai Differential Revision: D55501322 Pulled By: kirklandsign fbshipit-source-id: 242c94159a939811358114d161f082c77b818a70
1 parent 95b0daa commit cd7d5c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extension/android/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ add_subdirectory(${EXECUTORCH_ROOT}/examples/third-party/fbjni
2323
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../lib/cmake/ExecuTorch)
2424
find_package(executorch CONFIG REQUIRED)
2525
target_link_options_shared_lib(executorch)
26-
target_link_options_shared_lib(portable_ops_lib)
2726

2827
set(link_libraries)
2928
list(APPEND link_libraries extension_data_loader extension_module executorch
30-
portable_ops_lib portable_kernels fbjni)
29+
fbjni)
3130

3231
if(TARGET optimized_native_cpu_ops_lib)
3332
list(APPEND link_libraries optimized_native_cpu_ops_lib optimized_kernels
34-
cpublas eigen_blas)
33+
portable_kernels cpublas eigen_blas)
3534
target_link_options_shared_lib(optimized_native_cpu_ops_lib)
35+
else()
36+
list(APPEND link_libraries portable_ops_lib portable_kernels)
37+
target_link_options_shared_lib(portable_ops_lib)
3638
endif()
3739
if(TARGET qnn_executorch_backend)
3840
list(APPEND link_libraries qnn_executorch_backend)

0 commit comments

Comments
 (0)