File tree Expand file tree Collapse file tree 4 files changed +24
-10
lines changed
Expand file tree Collapse file tree 4 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,22 @@ if(EXECUTORCH_BUILD_PYBIND)
796796endif ()
797797
798798if (EXECUTORCH_BUILD_WASM)
799+ if (NOT EXECUTORCH_BUILD_EXTENSION_DATA_LOADER)
800+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/data_loader)
801+ endif ()
802+
803+ if (NOT EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)
804+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/flat_tensor)
805+ endif ()
806+
807+ if (NOT EXECUTORCH_BUILD_EXTENSION_MODULE)
808+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/module)
809+ endif ()
810+
811+ if (NOT EXECUTORCH_BUILD_EXTENSION_TENSOR)
812+ add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/tensor)
813+ endif ()
814+
799815 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /extension/wasm)
800816endif ()
801817
Original file line number Diff line number Diff line change 3737 embind
3838 executorch_core
3939 extension_data_loader
40- portable_ops_lib
4140 extension_module_static
4241 extension_tensor
4342 extension_runner_util
@@ -49,7 +48,11 @@ target_compile_options(executorch_wasm PUBLIC ${_common_compile_options})
4948target_include_directories (
5049 executorch_wasm PUBLIC ${_common_include_directories}
5150)
52- target_link_libraries (executorch_wasm PUBLIC ${link_libraries} )
51+ target_link_libraries (
52+ executorch_wasm
53+ PUBLIC ${link_libraries}
54+ INTERFACE executorch_kernels
55+ )
5356
5457if (EXECUTORCH_BUILD_WASM_TESTS)
5558 add_subdirectory (test )
Original file line number Diff line number Diff line change @@ -41,10 +41,10 @@ add_custom_target(
4141)
4242
4343add_executable (executorch_wasm_tests)
44- target_link_libraries (executorch_wasm_tests PUBLIC executorch_wasm)
44+ target_link_libraries (executorch_wasm_tests PRIVATE executorch_wasm)
4545target_link_options (
4646 executorch_wasm_tests
47- PUBLIC
47+ PRIVATE
4848 --embed-file
4949 "${MODELS_DIR} @/"
5050 --post-js
Original file line number Diff line number Diff line change @@ -9,12 +9,7 @@ CMAKE_OUT=cmake-out-wasm
99
1010cd " $( dirname " ${BASH_SOURCE[0]} " ) /../"
1111emcmake cmake . -DEXECUTORCH_BUILD_WASM=ON \
12- -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
13- -DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
14- -DEXECUTORCH_BUILD_DEVTOOLS=ON \
15- -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
16- -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
17- -DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
12+ -DEXECUTORCH_SELECT_OPS_LIST=" aten::mm.out,aten::add.out" \
1813 -DEXECUTORCH_BUILD_WASM_TESTS=ON \
1914 -DCMAKE_BUILD_TYPE=Release \
2015 -B" ${CMAKE_OUT} "
You can’t perform that action at this time.
0 commit comments