Skip to content

Commit 1cd4ac0

Browse files
authored
Build EXTENSION_DATA_LOADER with size_test (#12678)
size_test.cpp uses FileDataLoader. Looks like this happens to work currently because of the missing cmake_deps.toml entry that gets fixed in #12744
1 parent 1af1d11 commit 1cd4ac0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/build_size_test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# LICENSE file in the root directory of this source tree.
77

88
# Build size_test and show the size of it
9-
set -e
9+
set -ex
1010

1111
# shellcheck source=/dev/null
1212
source "$(dirname "${BASH_SOURCE[0]}")/../.ci/scripts/utils.sh"
@@ -23,11 +23,17 @@ 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
2631
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DBUCK2="$BUCK2" \
2732
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
2833
-DCMAKE_INSTALL_PREFIX=cmake-out \
2934
-DCMAKE_BUILD_TYPE=Release \
3035
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
36+
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=${BUILD_DATA_LOADER} \
3137
-DEXECUTORCH_OPTIMIZE_SIZE=ON \
3238
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
3339
${EXTRA_BUILD_ARGS} \

tools/cmake/preset/default.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ check_required_options_on(
249249

250250
check_conflicting_options_on(
251251
IF_ON EXECUTORCH_BUILD_ARM_BAREMETAL CONFLICTS_WITH
252-
EXECUTORCH_BUILD_EXTENSION_DATA_LOADER EXECUTORCH_BUILD_PTHREADPOOL
252+
EXECUTORCH_BUILD_PTHREADPOOL
253253
EXECUTORCH_BUILD_CPUINFO
254254
)
255255

0 commit comments

Comments
 (0)