@@ -759,49 +759,51 @@ generated_file("android_entitlement_config") {
759759 deps = []
760760}
761761
762- zip_bundle (" gen_snapshot" ) {
763- gen_snapshot_out_dir =
764- get_label_info (" $dart_src /runtime/bin:gen_snapshot($host_toolchain )" ,
765- " root_out_dir" )
762+ if (target_cpu != " x86" ) {
763+ zip_bundle (" gen_snapshot" ) {
764+ gen_snapshot_out_dir =
765+ get_label_info (" $dart_src /runtime/bin:gen_snapshot($host_toolchain )" ,
766+ " root_out_dir" )
766767
767- # The source gen_snapshot binary from the build outputs.
768- gen_snapshot_src = rebase_path (" $gen_snapshot_out_dir /gen_snapshot" )
768+ # The source gen_snapshot binary from the build outputs.
769+ gen_snapshot_src = rebase_path (" $gen_snapshot_out_dir /gen_snapshot" )
769770
770- # The output gen_snapshot binary name in the archive.
771- gen_snapshot_dest = " gen_snapshot"
771+ # The output gen_snapshot binary name in the archive.
772+ gen_snapshot_dest = " gen_snapshot"
772773
773- if (host_os == " mac" ) {
774- gen_snapshot_src = rebase_path (" $root_out_dir /universal/gen_snapshot" )
775- } else if (host_os == " win" ) {
776- gen_snapshot_src = rebase_path (" $root_out_dir /gen_snapshot.exe" )
777- gen_snapshot_dest = " gen_snapshot.exe"
778- }
779-
780- if (host_os == " linux" ) {
781- output = " $android_zip_archive_dir /linux-x64.zip"
782- } else if (host_os == " mac" ) {
783- output = " $android_zip_archive_dir /darwin-x64.zip"
784- } else if (host_os == " win" ) {
785- output = " $android_zip_archive_dir /windows-x64.zip"
786- }
787-
788- files = [
789- {
790- source = gen_snapshot_src
791- destination = gen_snapshot_dest
792- },
793- ]
774+ if (host_os == " mac" ) {
775+ gen_snapshot_src = rebase_path (" $root_out_dir /universal/gen_snapshot" )
776+ } else if (host_os == " win" ) {
777+ gen_snapshot_src = rebase_path (" $root_out_dir /gen_snapshot.exe" )
778+ gen_snapshot_dest = " gen_snapshot.exe"
779+ }
794780
795- deps = [ " //flutter/lib/snapshot:generate_snapshot_bins" ]
781+ if (host_os == " linux" ) {
782+ output = " $android_zip_archive_dir /linux-x64.zip"
783+ } else if (host_os == " mac" ) {
784+ output = " $android_zip_archive_dir /darwin-x64.zip"
785+ } else if (host_os == " win" ) {
786+ output = " $android_zip_archive_dir /windows-x64.zip"
787+ }
796788
797- if (host_os == " mac" ) {
798- deps += [ " :android_entitlement_config" ]
799- files += [
789+ files = [
800790 {
801- source = " $target_gen_dir /android_entitlements.txt "
802- destination = " entitlements.txt "
791+ source = gen_snapshot_src
792+ destination = gen_snapshot_dest
803793 },
804794 ]
795+
796+ deps = [ " //flutter/lib/snapshot:generate_snapshot_bins" ]
797+
798+ if (host_os == " mac" ) {
799+ deps += [ " :android_entitlement_config" ]
800+ files += [
801+ {
802+ source = " $target_gen_dir /android_entitlements.txt"
803+ destination = " entitlements.txt"
804+ },
805+ ]
806+ }
805807 }
806808}
807809
@@ -842,8 +844,10 @@ group("android") {
842844 " :android_javadoc" ,
843845 " :android_symbols" ,
844846 " :flutter_jar_zip" ,
845- " :gen_snapshot" ,
846847 ]
848+ if (target_cpu != " x86" ) {
849+ deps += [ " :gen_snapshot" ]
850+ }
847851}
848852
849853# Renames embedding android artifacts and places them in the final
0 commit comments