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

Reverts "[macOS] Generate universal gen_snapshots (#52885)" #52913

Merged
merged 1 commit into from
May 17, 2024
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
4 changes: 2 additions & 2 deletions build/archives/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ if (is_mac) {
output = "$full_platform_name$suffix/gen_snapshot.zip"
files = [
{
source = "${root_out_dir}/gen_snapshot_${target_cpu}"
destination = "gen_snapshot_${target_cpu}"
source = "$root_out_dir/gen_snapshot_$target_cpu"
destination = "gen_snapshot_$target_cpu"
},
]
}
Expand Down
1 change: 0 additions & 1 deletion ci/licenses_golden/excluded_files
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@
../../../flutter/sky/tools/create_embedder_framework.py
../../../flutter/sky/tools/create_full_ios_framework.py
../../../flutter/sky/tools/create_ios_framework.py
../../../flutter/sky/tools/create_macos_binary.py
../../../flutter/sky/tools/create_macos_framework.py
../../../flutter/sky/tools/create_macos_gen_snapshots.py
../../../flutter/sky/tools/create_xcframework.py
Expand Down
54 changes: 8 additions & 46 deletions lib/snapshot/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -186,54 +186,16 @@ if (host_os == "mac" && target_os != "mac" &&
#
# This target is used for builds targeting macOS.
if (host_os == "mac" && target_os == "mac") {
template("build_mac_gen_snapshot") {
assert(defined(invoker.host_arch))
host_cpu = invoker.host_arch

build_toolchain = "//build/toolchain/mac:clang_$host_cpu"
if (host_cpu == target_cpu) {
gen_snapshot_target_name = "gen_snapshot_host_targeting_host"
} else {
gen_snapshot_target_name = "gen_snapshot"
}
gen_snapshot_target =
"$dart_src/runtime/bin:$gen_snapshot_target_name($build_toolchain)"

copy(target_name) {
# The toolchain-specific output directory. For cross-compiles, this is a
# clang-x64 or clang-arm64 subdirectory of the top-level build directory.
output_dir = get_label_info(gen_snapshot_target, "root_out_dir")

sources = [ "${output_dir}/${gen_snapshot_target_name}" ]
outputs =
[ "${root_out_dir}/artifacts_$host_cpu/gen_snapshot_${target_cpu}" ]
deps = [ gen_snapshot_target ]
}
}

build_mac_gen_snapshot("create_macos_gen_snapshot_arm64_${target_cpu}") {
host_arch = "arm64"
}

build_mac_gen_snapshot("create_macos_gen_snapshot_x64_${target_cpu}") {
host_arch = "x64"
}
copy("create_macos_gen_snapshots") {
# The toolchain-specific output directory. For cross-compiles, this is a
# clang-x64 or clang-arm64 subdirectory of the top-level build directory.
host_output_dir =
get_label_info("$dart_src/runtime/bin:gen_snapshot($host_toolchain)",
"root_out_dir")

action("create_macos_gen_snapshots") {
script = "//flutter/sky/tools/create_macos_binary.py"
sources = [ "${host_output_dir}/gen_snapshot" ]
outputs = [ "${root_out_dir}/gen_snapshot_${target_cpu}" ]
args = [
"--in-arm64",
rebase_path("${root_out_dir}/artifacts_arm64/gen_snapshot_${target_cpu}"),
"--in-x64",
rebase_path("${root_out_dir}/artifacts_x64/gen_snapshot_${target_cpu}"),
"--out",
rebase_path("${root_out_dir}/gen_snapshot_${target_cpu}"),
]
deps = [
":create_macos_gen_snapshot_arm64_${target_cpu}",
":create_macos_gen_snapshot_x64_${target_cpu}",
]
deps = [ "$dart_src/runtime/bin:gen_snapshot($host_toolchain)" ]
}
}

Expand Down
54 changes: 0 additions & 54 deletions sky/tools/create_macos_binary.py

This file was deleted.