Skip to content

Commit

Permalink
Fix create_arm_gen_snapshot target (flutter#26538)
Browse files Browse the repository at this point in the history
  • Loading branch information
mraleph authored and naudzghebre committed Sep 2, 2021
1 parent 47dd714 commit 5092390
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -197,27 +197,29 @@ bin_to_linkable("platform_strong_dill_linkable") {
executable = false
}

action("create_arm_gen_snapshot") {
output_dir = "$root_out_dir/clang_x64"
script = "//flutter/sky/tools/create_macos_gen_snapshots.py"
visibility = [ ":*" ]
deps = [ "//third_party/dart/runtime/bin:gen_snapshot" ]
args = [
"--dst",
rebase_path(output_dir),
]
if (target_cpu == "arm") {
args += [
"--armv7-out-dir",
rebase_path("$root_out_dir"),
]
outputs = [ "$output_dir/gen_snapshot_armv7" ]
} else {
args += [
"--arm64-out-dir",
rebase_path("$root_out_dir"),
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
action("create_arm_gen_snapshot") {
output_dir = "$root_out_dir/clang_x64"
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),
]
outputs = [ "$output_dir/gen_snapshot_arm64" ]
if (target_cpu == "arm") {
args += [
"--armv7-out-dir",
rebase_path("$root_out_dir"),
]
outputs = [ "$output_dir/gen_snapshot_armv7" ]
} else {
args += [
"--arm64-out-dir",
rebase_path("$root_out_dir"),
]
outputs = [ "$output_dir/gen_snapshot_arm64" ]
}
}
}

Expand All @@ -229,7 +231,7 @@ source_set("snapshot") {
":vm_snapshot_data_linkable",
":vm_snapshot_instructions_linkable",
]
if (host_os == "macos" && (target_cpu == "arm" || target_cpu == "arm64")) {
if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) {
deps += [ ":create_arm_gen_snapshot" ]
}

Expand Down

0 comments on commit 5092390

Please sign in to comment.