Support building for arm64 with pointer authentication for macOS
Categories
(Firefox Build System :: General, task)
Tracking
(Not tracked)
People
(Reporter: glandium, Assigned: glandium)
References
(Blocks 2 open bugs)
Details
(Keywords: leave-open)
Attachments
(1 file)
Assignee | ||
Comment 1•8 months ago
•
|
||
Status:
- We need support in config.sub (https://lists.gnu.org/archive/html/config-patches/2024-01/msg00002.html)
- There is a small adjustment to do to build/moz.configure/init.configure to support it properly
- We need a compiler-rt for arm64e
- LLD doesn't support arm64e (https://github.com/llvm/llvm-project/issues/79543)
- Rust doesn't support arm64e until 1.76, but even then, it doesn't come with prebuilt libstd yet (https://github.com/rust-lang/compiler-team/issues/717)
- It's not entirely clear if the ABI is stabilitized in LLVM, and it's not clear whether there have been changes in the ABI since the release of the first M1 macs. It's also not entirely clear if Apple has downstreamed everything to LLVM yet. Notably https://github.com/llvm/llvm-project/pull/71128 landed recently, and won't be in a released clang version until clang 18.
I have PoC patches for the first three.
I got a build on try using a custom rust compiler with -Z build-std and cctools, and the resulting build gets into a rust panic on startup, where the function call originates from NS_InvokeByIndex. Chances are xptcall needs adjustments, but I haven't dug into what's going wrong yet.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 2•8 months ago
|
||
Currently, it's handled as if it were a 32-bits arm triplet.
Assignee | ||
Comment 3•8 months ago
•
|
||
It's not entirely clear if the ABI is stabilitized in LLVM
The ABI has changed, and open-source LLVM doesn't support the (presumably) final ABI, which also means Rust, even with what it has in 1.76, doesn't actually support it either. (https://github.com/llvm/llvm-project/issues/80200)
I got a build on try using a custom rust compiler with -Z build-std and cctools, and the resulting build gets into a rust panic on startup, where the function call originates from NS_InvokeByIndex. Chances are xptcall needs adjustments, but I haven't dug into what's going wrong yet.
It was a red herring, probably from bug 1877389.
Assignee | ||
Comment 4•8 months ago
|
||
Comment 5•7 months ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:glandium, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Updated•7 months ago
|
Assignee | ||
Comment 6•4 months ago
|
||
This is also blocking the testing of iOS builds on-device (we're not able to locally install an app using BrowserEngineKit without arm64e)
Description
•