Skip to content

Commit fda44c1

Browse files
authored
Unrolled build for #155716
Rollup merge of #155716 - cypherair:prep/upstream-ready-arm64e-ptrauth-core-diagnostics-2026-04-24-u9836b06, r=madsmtm arm64e: set ptrauth ABI subtype on lib.rmeta Mach-O objects Set `CPU_SUBTYPE_PTRAUTH_ABI` (as well as the existing `CPU_SUBTYPE_ARM64E`) on ARM64e object files that `rustc` creates, to match Clang/LLVM-generated ARM64e objects. This corresponds to `cpusubtype == 0x80000002`. Before this change, rustc emitted the bare `CPU_SUBTYPE_ARM64E` subtype for the metadata wrapper objects / `symbols.o` file, producing `0x00000002`, which can be reported by Apple's linker as `arm64e.old`. Fixes [#130085](#130085). Fixes [#143844](#143844). Fixes [#150046](#150046). Fixes [#139218](#139218).
2 parents 2f43fe4 + 8c029d5 commit fda44c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

compiler/rustc_codegen_ssa/src/back/metadata.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,9 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
216216
file.set_sub_architecture(sub_architecture);
217217
if sess.target.is_like_darwin {
218218
if macho_is_arm64e(&sess.target) {
219-
file.set_macho_cpu_subtype(object::macho::CPU_SUBTYPE_ARM64E);
219+
file.set_macho_cpu_subtype(
220+
object::macho::CPU_SUBTYPE_ARM64E | object::macho::CPU_SUBTYPE_PTRAUTH_ABI,
221+
);
220222
}
221223

222224
file.set_macho_build_version(macho_object_build_version_for_target(sess))

0 commit comments

Comments
 (0)