From 8656266eb4f7ec2e4b6fe147ed39709f6e70b6ec Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Tue, 4 Nov 2025 06:29:09 -0800 Subject: [PATCH] [vm] Exclude Perfetto from Flutter release engines This addresses size regression which was introduced by commit 489f63a3bd89e89864d95ffa7b8366576e3f0de0. Fixes https://github.com/flutter/flutter/issues/177943 TEST=manually built Flutter engine with this change to confirm Change-Id: I42ea874a5b61e212ae0aab25f3da39666a6a6964 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459461 Reviewed-by: Martin Kustermann Commit-Queue: Slava Egorov --- runtime/runtime_args.gni | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni index ea0aaaed36e..aae141a8753 100644 --- a/runtime/runtime_args.gni +++ b/runtime/runtime_args.gni @@ -85,15 +85,18 @@ declare_args() { # from being built on platforms which have a problem linking in the # Perfetto library, e.g. watchOS. # - # We also exclude perfetto support when producing product builds for - # mobile OSes. + # We also exclude perfetto support when producing builds which set + # dart_runtime_mode to release e.g. Dart Product builds or Flutter + # release engine variants. This does not affect product AOT runtime + # which shipped with Dart SDK. + # + # Note: including Perfetto support automatically includes profiler + # into the resulting binary. # # is_watchos may be undefined when Dart SDK is built from the Flutter # engine tree. dart_support_perfetto = - !((defined(is_watchos) && is_watchos) || - (dart_runtime_mode == "release" && - ((defined(is_ios) && is_ios) || (defined(is_android) && is_android)))) + !((defined(is_watchos) && is_watchos) || dart_runtime_mode == "release") # The analyze_snapshot tool is only supported on 64 bit AOT builds that use # ELF.