Hi everyone!
I am trying to test the com.apple.developer.cross-architecture-support entitlement (as I am developing an x86-64 to ARM64 dynamic binary translation runtime), and I have successfully verified it in an Apple Development-signed native ARM64 application with Hardened Runtime enabled.
The macOS SDK exposes the following declaration in <mach/mach_traps.h>:
extern kern_return_t thread_set_x86_64_compat(uint32_t enable);
However, I cannot locate official documentation describing its supported usage.
Could an Apple engineer clarify:
- Is this a supported API for third-party applications holding the cross-architecture-support entitlement?
- Does it enable hardware TSO independently for each calling thread?
- Do newly created threads inherit the setting?
- Does it affect architectural behaviour beyond memory ordering?
- Is there a supported mechanism for querying the effective state?
- Can it be used alongside Hardened Runtime and MAP_JIT?
My test environment is an M4 Max running macOS 27.2.1, with Xcode 27.2, and the documented os_cross_arch_is_supported(OS_CROSS_ARCH_X86_64) returns true.
I have deliberately avoided invoking the compatibility API until its supported usage is established...
Any official documentation or integration guidance would be appreciated.