Skip to content

Commit 699e73d

Browse files
authored
Arm backend: Remove special host build of flatcc (#11278)
### Summary This was a workaround as host version of flattcc was not generated from the build as it should and you got the target version. Later when flattcc was needed on the host it was the wrong version and you got an error. Now this has been solved in the project and flattcc is only build for the host so there is no need to force a special build like this anymore. ### Test plan Tested in local build and on GitHub Signed-off-by: Zingo Andersen <[email protected]>
1 parent 67158e3 commit 699e73d

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

backends/arm/scripts/build_executorch.sh

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -54,47 +54,9 @@ source ${setup_path_script}
5454

5555
et_build_dir="${et_build_root}/cmake-out"
5656

57-
# Used for flatcc host excutable if Devtools is used
58-
et_build_host_dir=${et_build_root}/cmake-out-host-tools
59-
6057
set -x
6158
cd "${et_root_dir}"
6259

63-
if [ "$build_with_etdump" = true ] ; then
64-
( set +x ;
65-
echo "--------------------------------------------------------------------------------" ;
66-
echo "Build ExecuTorch Libraries host flatcc bin ${build_type} into ${et_build_host_dir}/bin/flatcc" ;
67-
echo "--------------------------------------------------------------------------------" )
68-
69-
# Build host flatcc bin
70-
# This is a way to work around that the flatcc executable get build for target (e.g. Arm) later
71-
# and get replaced. flatcc is a tool used on the host for etdump and BundleIO handling.
72-
# The way to solve this is to generate it once for the host, then copy it to ${et_build_host_dir}/bin
73-
# and later point that out with -DFLATCC_EXECUTABLE=${et_build_host_dir}/bin/flatcc later.
74-
75-
cmake \
76-
-DCMAKE_INSTALL_PREFIX=${et_build_host_dir} \
77-
-DCMAKE_BUILD_TYPE=${build_type} \
78-
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
79-
-DEXECUTORCH_ENABLE_LOGGING=ON \
80-
-DEXECUTORCH_BUILD_ARM_BAREMETAL=ON \
81-
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
82-
-DEXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL=ON \
83-
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
84-
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
85-
-DFLATCC_ALLOW_WERROR=OFF \
86-
-B"${et_build_host_dir}" \
87-
"${et_root_dir}"
88-
89-
# third-party/flatcc/bin/flatcc gets build already in the in the cmake config step above
90-
# so there is no cmake building step done
91-
92-
# Copy host flatcc excutable so it's saved when we build for target (Arm) later
93-
et_build_host_dir=$(realpath ${et_build_host_dir})
94-
mkdir -p ${et_build_host_dir}/bin
95-
cp third-party/flatcc/bin/flatcc ${et_build_host_dir}/bin
96-
fi
97-
9860
( set +x ;
9961
echo "--------------------------------------------------------------------------------" ;
10062
echo "Build ExecuTorch target libs ${build_type} into '${et_build_dir}'" ;
@@ -111,8 +73,7 @@ if [ "$build_with_etdump" = true ] ; then
11173
build_with_etdump_flags="-DEXECUTORCH_BUILD_DEVTOOLS=ON \
11274
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
11375
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=OFF \
114-
-DFLATCC_ALLOW_WERROR=OFF \
115-
-DFLATCC_EXECUTABLE=${et_build_host_dir}/bin/flatcc "
76+
-DFLATCC_ALLOW_WERROR=OFF "
11677
fi
11778

11879
echo "Building with Devtools: ${build_devtools_flags} ${build_with_etdump_flags}"

0 commit comments

Comments
 (0)