Skip to content

Commit df4286f

Browse files
committed
Build size_test binaries with debug info
The CI workflow already runs strip before checking size, so this shouldn't break it (and we'll see if it does on this PR). Having debug info makes it much easier to investigate issues with bloaty. ghstack-source-id: d15388a ghstack-comment-id: 3009793476 Pull-Request-resolved: #12019
1 parent a50bafa commit df4286f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/build_size_test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ cmake_install_executorch_lib() {
2626
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DBUCK2="$BUCK2" \
2727
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
2828
-DCMAKE_INSTALL_PREFIX=cmake-out \
29-
-DCMAKE_BUILD_TYPE=Release \
29+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
3030
-DEXECUTORCH_BUILD_EXECUTOR_RUNNER=OFF \
3131
-DEXECUTORCH_OPTIMIZE_SIZE=ON \
3232
-DPYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" \
3333
${EXTRA_BUILD_ARGS} \
3434
-Bcmake-out .
35-
cmake --build cmake-out -j9 --target install --config Release
35+
cmake --build cmake-out -j9 --target install --config RelWithDebInfo
3636
}
3737

3838
test_cmake_size_test() {
39-
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DCMAKE_BUILD_TYPE=Release \
39+
CXXFLAGS="$COMMON_CXXFLAGS" retry cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
4040
-DCMAKE_INSTALL_PREFIX=cmake-out \
4141
${EXTRA_BUILD_ARGS} \
4242
-Bcmake-out/test test
4343

4444
echo "Build size test"
45-
cmake --build cmake-out/test -j9 --config Release
45+
cmake --build cmake-out/test -j9 --config RelWithDebInfo
4646

4747
echo 'ExecuTorch with no ops binary size, unstripped:'
4848
ls -al cmake-out/test/size_test

0 commit comments

Comments
 (0)