[vm] Exclude Perfetto from Flutter release engines

This addresses size regression which was introduced by
commit 489f63a3bd.

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 <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
Slava Egorov
2025-11-04 06:29:09 -08:00
committed by Commit Queue
parent 5343e1b2d7
commit 8656266eb4
+8 -5
View File
@@ -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.