Skip to content

Commit cea96fd

Browse files
committed
Fix missing cmake_deps.toml dep from size_test to extension_data_loader
Missing deps like this causes executorch_srcs.cmake to just roll the sources into the would-be-depending target, which is bad. ghstack-source-id: a9ec1d3 ghstack-comment-id: 3105633149 Pull-Request: #12744
1 parent 5e2fa45 commit cea96fd

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

test/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ list(TRANSFORM _size_test__srcs PREPEND "${EXECUTORCH_ROOT}/")
5151
# TODO(larryliu0820): Add EXECUTORCH_BUILD_EXECUTABLES to not build executable
5252
# when we cross compile to ios
5353
add_executable(size_test ${_size_test__srcs})
54-
target_link_libraries(size_test executorch)
54+
target_link_libraries(size_test executorch extension_data_loader)
5555
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
5656
target_link_options_gc_sections(size_test)
5757
endif()
@@ -62,7 +62,8 @@ endif()
6262
add_executable(size_test_all_ops ${_size_test__srcs})
6363
executorch_target_link_options_shared_lib(portable_ops_lib)
6464
target_link_libraries(
65-
size_test_all_ops executorch portable_ops_lib portable_kernels
65+
size_test_all_ops executorch extension_data_loader portable_ops_lib
66+
portable_kernels
6667
)
6768
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
6869
target_link_options_gc_sections(size_test_all_ops)
@@ -75,7 +76,8 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
7576
add_executable(size_test_all_optimized_ops ${_size_test__srcs})
7677
executorch_target_link_options_shared_lib(optimized_native_cpu_ops_lib)
7778
target_link_libraries(
78-
size_test_all_optimized_ops executorch optimized_native_cpu_ops_lib
79+
size_test_all_optimized_ops executorch extension_data_loader
80+
optimized_native_cpu_ops_lib
7981
)
8082
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
8183
target_link_options_gc_sections(size_test_all_optimized_ops)

test/build_size_test.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,12 @@ cmake_install_executorch_lib() {
2323
update_tokenizers_git_submodule
2424
local EXTRA_BUILD_ARGS="${@}"
2525

26-
if [[ "$EXTRA_BUILD_ARGS" == *"-DEXECUTORCH_BUILD_ARM_BAREMETAL=ON"* ]]; then
27-
local BUILD_DATA_LOADER="OFF"
28-
else
29-
local BUILD_DATA_LOADER=ON
30-
fi
3126
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DBUCK2="$BUCK2" \
3227
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
3328
-DCMAKE_INSTALL_PREFIX=cmake-out \
3429
-DCMAKE_BUILD_TYPE=Release \
3530
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
36-
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=${BUILD_DATA_LOADER} \
31+
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
3732
-DEXECUTORCH_OPTIMIZE_SIZE=ON \
3833
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
3934
${EXTRA_BUILD_ARGS} \

tools/cmake/cmake_deps.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ excludes = [
373373
deps = [
374374
"executorch_core",
375375
"executorch",
376+
"extension_data_loader",
376377
]
377378
# ---------------------------------- binary end ----------------------------------
378379
# ---------------------------------- MPS start ----------------------------------

0 commit comments

Comments
 (0)