0

[ios blink] Add support for arm64e target

This adds the targets for the current_cpu but nothing sets
this value just yet. setup-gn.py needs to be modified to produce
the appropriate target_cpu output.

Bug: 40254930, 408032145
Change-Id: I42acceb4e79ba26dd77827c8754b5215bb8b53ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6426931
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1442688}
This commit is contained in:
Dave Tapuska
2025-04-04 06:41:26 -07:00
committed by Chromium LUCI CQ
parent debb58d37c
commit 312e70ac39
7 changed files with 60 additions and 3 deletions
base/allocator/partition_allocator
build
config
toolchain
skia
third_party/crashpad/crashpad/util

@ -69,7 +69,9 @@ if (is_nacl) {
# NaCl targets don't use 64-bit pointers.
has_64_bit_pointers = false
} else if (current_cpu == "x64" || current_cpu == "arm64" ||
current_cpu == "loong64" || current_cpu == "riscv64") {
current_cpu == "arm64e" || current_cpu == "loong64" ||
current_cpu == "riscv64") {
assert(current_cpu != "arm64e" || (is_ios && target_environment == "device"))
has_64_bit_pointers = true
} else if (current_cpu == "x86" || current_cpu == "arm" ||
current_cpu == "wasm") {

@ -118,7 +118,8 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") {
}
}
}
} else if (current_cpu == "arm64" || v8_current_cpu == "arm64") {
} else if (current_cpu == "arm64" || v8_current_cpu == "arm64" ||
current_cpu == "arm64e" || v8_current_cpu == "arm64e") {
# arm64 supports only "hard".
arm_float_abi = "hard"
arm_use_neon = true

@ -26,6 +26,8 @@ config("compiler") {
triplet_cpu = "armv7"
} else if (current_cpu == "arm64") {
triplet_cpu = "arm64"
} else if (current_cpu == "arm64e") {
triplet_cpu = "arm64e"
} else {
assert(false, "unsupported cpu: $current_cpu")
}

@ -265,7 +265,12 @@ if (is_linux || is_chromeos) {
assert(false, "Architecture not supported")
}
} else if (is_ios) {
if (current_cpu == "arm64") {
if (current_cpu == "arm64e") {
assert(target_platform == "iphoneos",
"unsupported target_platform=$target_platform")
rust_abi_target = "arm64e-apple-ios"
cargo_target_abi = ""
} else if (current_cpu == "arm64") {
if (target_platform == "iphoneos") {
if (target_environment == "simulator") {
rust_abi_target = "aarch64-apple-ios-sim"
@ -358,6 +363,8 @@ if (current_cpu == "x86") {
rust_target_arch = "arm"
} else if (current_cpu == "arm64") {
rust_target_arch = "aarch64"
} else if (current_cpu == "arm64e") {
rust_target_arch = "arm64e"
} else if (current_cpu == "mipsel") {
rust_target_arch = "mips"
} else if (current_cpu == "mips64el") {

@ -76,6 +76,15 @@ ios_toolchain("ios_clang_arm64") {
}
}
ios_toolchain("ios_clang_arm64e") {
toolchain_args = {
current_cpu = "arm64e"
# TODO(crbug.com/408032145): Add ptrauth support to lld, remove this.
use_lld = false
}
}
ios_toolchain("ios_clang_arm64_16_0") {
toolchain_args = {
current_cpu = "arm64"
@ -83,6 +92,16 @@ ios_toolchain("ios_clang_arm64_16_0") {
}
}
ios_toolchain("ios_clang_arm64e_16_0") {
toolchain_args = {
current_cpu = "arm64e"
ios_deployment_target = "16.0"
# TODO(crbug.com/408032145): Add ptrauth support to lld, remove this.
use_lld = false
}
}
ios_toolchain("ios_clang_x64") {
toolchain_args = {
current_cpu = "x64"
@ -102,6 +121,15 @@ ios_app_ext_toolchain("ios_clang_arm64_app_ext") {
}
}
ios_app_ext_toolchain("ios_clang_arm64e_app_ext") {
toolchain_args = {
current_cpu = "arm64e"
# TODO(crbug.com/408032145): Add ptrauth support to lld, remove this.
use_lld = false
}
}
ios_blink_app_ext_toolchain("ios_clang_arm64_blink_app_ext") {
toolchain_args = {
current_cpu = "arm64"
@ -109,6 +137,16 @@ ios_blink_app_ext_toolchain("ios_clang_arm64_blink_app_ext") {
}
}
ios_blink_app_ext_toolchain("ios_clang_arm64e_blink_app_ext") {
toolchain_args = {
current_cpu = "arm64e"
use_blink = true
# TODO(crbug.com/408032145): Add ptrauth support to lld, remove this.
use_lld = false
}
}
ios_blink_app_ext_toolchain("ios_clang_x64_blink_app_ext") {
toolchain_args = {
current_cpu = "x64"

@ -781,6 +781,8 @@ skia_source_set("skia_opts") {
}
} else if (current_cpu == "arm64") {
# Conditional and empty body needed to avoid assert() below.
} else if (current_cpu == "arm64e") {
# Conditional and empty body needed to avoid assert() below.
} else if (current_cpu == "mipsel") {
cflags += [ "-fomit-frame-pointer" ]
} else if (current_cpu == "mips64el") {

@ -137,6 +137,11 @@ if (crashpad_is_apple) {
"--arch",
"arm64",
]
} else if (current_cpu == "arm64e") {
args += [
"--arch",
"arm64e",
]
} else if (crashpad_is_mac && current_cpu == "mac_universal") {
args += [
"--arch",