Skip to content

Commit

Permalink
Only build analyze_snapshot on Linux host (flutter#39129)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderso authored Jan 25, 2023
1 parent 24aa324 commit c545801
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ group("flutter") {
# gen_snapshot for the host and not the target.
"//third_party/dart/runtime/bin:gen_snapshot",

# Built alongside gen_snapshot for 64 bit targets
"//third_party/dart/runtime/bin:analyze_snapshot",

# Impeller artifacts - compiler and libtessellator
"//flutter/impeller/compiler:impellerc",
"//flutter/impeller/tessellator:tessellator_shared",
Expand All @@ -93,6 +90,13 @@ group("flutter") {
"//flutter/tools/path_ops",
]

if (host_os == "linux") {
public_deps += [
# Built alongside gen_snapshot for 64 bit targets
"//third_party/dart/runtime/bin:analyze_snapshot",
]
}

if (full_dart_sdk) {
public_deps += [ "//flutter/web_sdk" ]
}
Expand Down
2 changes: 1 addition & 1 deletion lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ group("generate_snapshot_bins") {
}

# Build analyze_snapshot for 64-bit target CPUs.
if (target_cpu == "x64" || target_cpu == "arm64") {
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
deps +=
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
}
Expand Down
2 changes: 1 addition & 1 deletion shell/platform/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ if (target_cpu != "x86") {
}
}

if (target_cpu == "x64" || target_cpu == "arm64") {
if (host_os == "linux" && (target_cpu == "x64" || target_cpu == "arm64")) {
zip_bundle("analyze_snapshot") {
deps =
[ "//third_party/dart/runtime/bin:analyze_snapshot($host_toolchain)" ]
Expand Down

0 comments on commit c545801

Please sign in to comment.