Commit 1569b0aa authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

mac/arm: Remove two toolchain workarounds.

The toolchain we rolled in on Wednesday fixes the underlying bugs.

1. Stop explicitly passing -mcpu=apple-a12. clang now passes this
   implicitly when handing it `-march arm64 -mmacosx-version=min=...`.
   (Note: Xcode clang also uses a `arm64-apple-macos` triple and hence
   apple-a12 with just `-march arm64`. Open-source clang currently
   defaults to `arm64-apple-ios` and hence apple-a7 with `-march arm64`.
   I asked about this at https://reviews.llvm.org/D82699#2379434 ).

2. Re-enable fatal linker warnings in arm64 component builds. The
   symbols that new clang emits no longer trigger ld64 warnings.

No intended behavior change (except fewer build warnings in arm64
component builds).

Bug: 1119249,1107955
Cq-Include-Trybots: luci.chromium.try:mac-arm64-rel
Change-Id: If6a866456461613e46ade36da436991c9d617bc5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521213Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824991}
parent 542dc277
......@@ -295,9 +295,7 @@ config("compiler") {
if (fatal_linker_warnings && !is_apple && current_os != "aix") {
ldflags += [ "-Wl,--fatal-warnings" ]
}
if (fatal_linker_warnings && is_apple &&
# TODO(https://crbug.com/1107955): Enable in arm64 component builds.
!(is_mac && target_cpu == "arm64" && is_component_build)) {
if (fatal_linker_warnings && is_apple) {
ldflags += [ "-Wl,-fatal_warnings" ]
}
} else {
......
......@@ -28,17 +28,6 @@ config("compiler") {
common_mac_flags += [
"-arch",
current_cpu,
# The baseline CPU for macOS on arm64 is the Apple A12 (Vortex/Tempest),
# and clang should default to this when building for this OS/CPU
# combination. Apple clang embedded in Xcode 12 does, but trunk clang does
# not, instead targeting the Apple A7 (Cyclone), the proper baseline CPU
# for iOS on arm64. https://reviews.llvm.org/D82699 would fix it, but it
# hasn't gained any traction. Specify the baseline CPU explicitly here.
#
# TODO(https://crbug.com/1119249): Remove this when trunk clang has a
# better default.
"-mcpu=apple-a12",
]
} else {
assert(false, "unknown current_cpu $current_cpu")
......
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