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

Only build analyze_snapshot on Linux host #39129

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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