Skip to content

Commit

Permalink
Compute rather than hardcode the host output suffix (flutter#34978)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderso authored Jul 28, 2022
1 parent 0a547b3 commit 8195965
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,16 @@ bin_to_linkable("platform_strong_dill_linkable") {

if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
action("create_arm_gen_snapshot") {
if (host_cpu == "arm64") {
clang_dir = "clang_arm64"
} else {
clang_dir = "clang_x64"
}
output_dir = "$root_out_dir/$clang_dir"
host_output_dir = get_label_info(
"//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")
clang_dir = rebase_path(host_output_dir, root_build_dir)
script = "//flutter/sky/tools/create_macos_gen_snapshots.py"
visibility = [ ":*" ]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot($host_toolchain)" ]
args = [
"--dst",
rebase_path(output_dir),
rebase_path(host_output_dir),
"--clang-dir",
clang_dir,
]
Expand All @@ -225,13 +223,13 @@ if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
"--armv7-out-dir",
rebase_path("$root_out_dir"),
]
outputs = [ "$output_dir/gen_snapshot_armv7" ]
outputs = [ "$host_output_dir/gen_snapshot_armv7" ]
} else {
args += [
"--arm64-out-dir",
rebase_path("$root_out_dir"),
]
outputs = [ "$output_dir/gen_snapshot_arm64" ]
outputs = [ "$host_output_dir/gen_snapshot_arm64" ]
}
}
}
Expand Down

0 comments on commit 8195965

Please sign in to comment.