Commit 46318321 authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

macOS 11.0 SDK cleanup in base/mac/rosetta.mm

Now that we're building against the macOS 11 SDK, do
some cleanup.

Bug: 1105187
Change-Id: I53fe103d8006f03dacdf2a9a2241bf743f39755f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545232
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828443}
parent d4e5f661
......@@ -42,14 +42,14 @@ bool ProcessIsTranslated() {
#if defined(ARCH_CPU_ARM64)
bool IsRosettaInstalled() {
// Chromium currently requires the 10.15 SDK, but code compiled for Arm must
// be compiled against at least the 11.0 SDK and will run on at least macOS
// 11.0, so this is safe. __builtin_available doesn't work for 11.0 yet;
// https://crbug.com/1115294
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
return CFBundleIsArchitectureLoadable(CPU_TYPE_X86_64);
#pragma clang diagnostic pop
if (@available(macOS 11.0, *)) {
return CFBundleIsArchitectureLoadable(CPU_TYPE_X86_64);
} else {
// Arm Macs require at least 11.0 to run, so this branch will never be
// taken.
NOTREACHED();
return false;
}
}
void RequestRosettaInstallation(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment