Skip to content

Add macOS AArch64 support #1248

Activity

  1. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    O-macosOperating system: MacOS
    O-armTarget: ARM processors (arm, thumb and AArch64 targets)
    on Jul 24, 2022
  2. nathanwhit commented on Sep 19, 2022

    @nathanwhit

    I've been looking into this recently. I currently have the full sysroot compiling and passing most of the tests. I've opened a PR for the first set of changes required (supporting the necessary relocations in the object crate). I'm still working on cleaning up the cranelift changes and debugging a few issues before opening PRs.

  3. bjorn3 commented on Sep 19, 2022

    @bjorn3
    MemberAuthor

    Thanks a lot for working on this!

  4. bjorn3 commented on Mar 25, 2023

    @bjorn3
    MemberAuthor

    bytecodealliance/wasmtime#5434 has been merged, so tls should work now. Variadic functions like printf will need proper Cranelift support as with the AArch64 macOS ABI variadic arguments are always passed on the stack. The current workaround for missing variadic function support in Cranelift depends on the ABI for variadic arguments being the same as non-variadic arguments, like is the case on most platforms. I will probably also need to hard code support for objc_msgSend as it can have multiple signatures at the same time depending on the passed in message selector.

  5. bjorn3 commented on Jan 25, 2024

    @bjorn3
    MemberAuthor

    I just updated the macos_m1_ci branch to test it on cirrus ci. After disabling all debuginfo generation and skipping the tests that use printf (as it is a variadic function), the rest of the tests pass.

  6. bjorn3 commented on Jan 26, 2024

    @bjorn3
    MemberAuthor

    Turns out there is at least one place in libstd where a variadic function is called: https://cirrus-ci.com/task/4835070486249472?logs=test#L116 This can't work until #1451 is fixed. I could make all these calls abort as workaround, but it doesn't sit right with me to announce that arm64 macOS works with that in place.

    Edit: Yeah, just tried with an LLVM sysroot and even that will locally codegen the vararg open() function.

  7. andrewgazelka commented on Jun 14, 2024

    @andrewgazelka

    I just updated the macos_m1_ci branch to test it on cirrus ci. After disabling all debuginfo generation and skipping the tests that use printf (as it is a variadic function), the rest of the tests pass.

    Hey @bjorn3 . If I want to try rustc_codegen_cranelift on macOS AArch64 and cross my fingers nothing is using varargs, what is the best way for me to do this?

  8. bjorn3 commented on Jun 15, 2024

    @bjorn3
    MemberAuthor

    Unfortunately even for simple programs the standard library needs to use varargs internally. I tried already.

  9. bjorn3 commented on Jun 21, 2024

    @bjorn3
    MemberAuthor

    @beetrees implemented support for varargs without needing Cranelift changes in #1500.

  10. added a commit that references this issue on Jun 21, 2024
    aa5d7a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.O-armTarget: ARM processors (arm, thumb and AArch64 targets)O-macosOperating system: MacOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions