My understanding is that this requires using Apple's LLVM fork and modifications to the LLVM IR generator (in this case rustc) to specify the metadata that is checked during pointer authentication. Also do you still have to disable SIP and pass a special kernel arg for macOS to accept arm64e binaries that are not signed by Apple? Also you will need to extend the object crate to support producing arm64e Mach-O object files and change https://github.com/rust-lang/rust/blob/c587fd418521c841f8683c58872293475b8d9b3b/compiler/rustc_codegen_ssa/src/back/metadata.rs#L185-L191 to produce arm64e binaries when using a target that uses them.
Yeah, could you explain why you'd like to do this? It's certainly possible, it's just going to be a lot of work and there might be an easier way to achieve it.
We can build arm64e apps using only C++. However, we have to be able to create arm64e apps for some research using Rust. Therefore, it would be great if Rust compiler supports arm64e architecture.
@arttet If you're only using the app on your local systems (building it yourself) is there a need to code sign it? Is ad hoc code signing not sufficient?
Yeah, you will need to add those intrinsics there. And then you will need to add the intrinsic calls in the appropriate locations. I'm not sure what the appropriate locations would be though. I did recommend taking a look at where clang calls them.