Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c545801

Browse files
authored
Only build analyze_snapshot on Linux host (#39129)
1 parent 24aa324 commit c545801

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

BUILD.gn

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,6 @@ group("flutter") {
8282
# gen_snapshot for the host and not the target.
8383
"//third_party/dart/runtime/bin:gen_snapshot",
8484

85-
# Built alongside gen_snapshot for 64 bit targets
86-
"//third_party/dart/runtime/bin:analyze_snapshot",
87-
8885
# Impeller artifacts - compiler and libtessellator
8986
"//flutter/impeller/compiler:impellerc",
9087
"//flutter/impeller/tessellator:tessellator_shared",
@@ -93,6 +90,13 @@ group("flutter") {
9390
"//flutter/tools/path_ops",
9491
]
9592

93+
if (host_os == "linux") {
94+
public_deps += [
95+
# Built alongside gen_snapshot for 64 bit targets
96+
"//third_party/dart/runtime/bin:analyze_snapshot",
97+
]
98+
}
99+
96100
if (full_dart_sdk) {
97101
public_deps += [ "//flutter/web_sdk" ]
98102
}

lib/snapshot/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ group("generate_snapshot_bins") {
3737
}
3838

3939
# Build analyze_snapshot for 64-bit target CPUs.
40-
if (target_cpu == "x64" || target_cpu == "arm64") {
40+
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
4141
deps +=
4242
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
4343
}

shell/platform/android/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ if (target_cpu != "x86") {
667667
}
668668
}
669669

670-
if (target_cpu == "x64" || target_cpu == "arm64") {
670+
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
671671
zip_bundle("analyze_snapshot") {
672672
deps =
673673
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]

0 commit comments

Comments
 (0)