diff --git a/engine/src/flutter/ci/binary_size_treemap.sh b/engine/src/flutter/ci/binary_size_treemap.sh index b144c4bc153..64ca0fac80b 100755 --- a/engine/src/flutter/ci/binary_size_treemap.sh +++ b/engine/src/flutter/ci/binary_size_treemap.sh @@ -27,4 +27,9 @@ ADDR2LINE="third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/pr # Run the binary size script from the buildroot directory so the treemap path # navigation will start from there. cd "$ENGINE_BUILDROOT" -python3 third_party/dart/runtime/third_party/binary_size/src/run_binary_size_analysis.py --library "$INPUT_PATH" --destdir "$DEST_DIR" --addr2line-binary "$ADDR2LINE" +RUN_BINARY_SIZE_ANALYSIS="third_party/dart/third_party/binary_size/src/run_binary_size_analysis.py" +if [[ ! -f "$RUN_BINARY_SIZE_ANALYSIS" ]]; then + # Fallback to the old path until https://dart-review.googlesource.com/c/sdk/+/332963 rolls to Flutter Engine. + RUN_BINARY_SIZE_ANALYSIS="third_party/dart/runtime/third_party/binary_size/src/run_binary_size_analysis.py" +fi +python3 "$RUN_BINARY_SIZE_ANALYSIS" --library "$INPUT_PATH" --destdir "$DEST_DIR" --addr2line-binary "$ADDR2LINE"