From 1df74f0938a4e06efca44197b795d63f091a5a57 Mon Sep 17 00:00:00 2001 From: godofredoc Date: Thu, 5 May 2022 09:54:08 -0700 Subject: [PATCH] Fix gtk targets for arm64 artifacts. (flutter/engine#33130) --- engine/src/flutter/common/config.gni | 24 +++++++++---------- .../src/flutter/shell/platform/linux/BUILD.gn | 7 +++--- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/engine/src/flutter/common/config.gni b/engine/src/flutter/common/config.gni index 679ef063462..fcbed38de79 100644 --- a/engine/src/flutter/common/config.gni +++ b/engine/src/flutter/common/config.gni @@ -68,23 +68,23 @@ if (is_ios || is_mac) { # A combo of host os name and cpu is used in several locations to # generate the names of the archived artifacts. -_platform_name = host_os -if (_platform_name == "mac") { - _platform_name = "darwin" -} else if (_platform_name == "win") { - _platform_name = "windows" +platform_name = host_os +if (platform_name == "mac") { + platform_name = "darwin" +} else if (platform_name == "win") { + platform_name = "windows" } -full_platform_name = "$_platform_name-$host_cpu" +full_platform_name = "$platform_name-$host_cpu" -_platform_target_name = target_os -if (_platform_target_name == "mac") { - _platform_target_name = "darwin" -} else if (_platform_target_name == "win") { - _platform_target_name = "windows" +target_platform_name = target_os +if (target_platform_name == "mac") { + platform_target_name = "darwin" +} else if (target_platform_name == "win") { + target_platform_name = "windows" } -full_target_platform_name = "$_platform_target_name-$target_cpu" +full_target_platform_name = "$target_platform_name-$target_cpu" # Prebuilt Dart SDK location diff --git a/engine/src/flutter/shell/platform/linux/BUILD.gn b/engine/src/flutter/shell/platform/linux/BUILD.gn index a8c2a1c4023..91419969c67 100644 --- a/engine/src/flutter/shell/platform/linux/BUILD.gn +++ b/engine/src/flutter/shell/platform/linux/BUILD.gn @@ -265,10 +265,11 @@ copy("publish_headers_linux") { zip_bundle("flutter_gtk") { prefix = "" - if (flutter_runtime_mode != "debug") { - prefix = "$full_platform_name-$flutter_runtime_mode/" + if (flutter_runtime_mode != "debug" || + (flutter_runtime_mode == "debug" && target_cpu != "x64")) { + prefix = "$full_target_platform_name-$flutter_runtime_mode/" } - output = "$prefix$full_platform_name-flutter-gtk.zip" + output = "${prefix}${full_target_platform_name}-flutter-gtk.zip" deps = [ ":flutter_linux_gtk", ":publish_headers_linux",