From c45478aba66c35b2b592f2e52df30fedb64a2558 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Thu, 2 Nov 2023 19:49:01 +0100 Subject: [PATCH] Add a temporary fallback to move run_binary_file_analysis.py (flutter/engine#47598) In https://dart-review.googlesource.com/c/sdk/+/332963, I'm merging the runtime/third_party directory into the SDK's top level third_party directory. This updates the script so that both the old and the new location are supported to avoid breaking the the rolls from Dart SDK to Flutter engine when the change above gets submitted. --- engine/src/flutter/ci/binary_size_treemap.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"