Skip to content

Encapsulated libraries on [aarch64] macOS #8

@yrashk

Description

@yrashk

Dear Simon,

I apologize if this issue is misdirected (I am new in Ada), I would be happy to hear an advice on where to direct this most appropriately.

I've been trying to build an encapsulated library on aarch64 macos (M1) and got

gprbuild: encapsulated library projects not supported on this platform

After some research, I ended up amending gnat.xml to contain <target name="^aarch64-.*darwin.*$" /> in the section that pertains to encapsulated support (as other targets for Darwin are listed), and that enabled gprbuild to proceed.

Question: Do you think this should get upstreamed (what's the best way to do this)?

Continuing, I was trying to build a macOS bundle (as opposed to a shared library). In a non-encapsulated library, I can, for example, change Shared_Library_Minimum_Switches to use -bundle/-bundle-loader (or shrink the list to nothing to allow for Linker_Options do this).

However, when I switched Library_Standalone to encapsulated, I got gprbuild add -shared -static-libgcc to GCC invocation. If I manually remove them and re-execute the line, everything works. Changing Library_Encapsulated_Options to () alleviates this problem. This shows how involved support for bundles can be. Do you think there is any way to simplify this whole setup?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions