How to build for M1?

I would like my package to work natively on Apple Silicon. I plan to initiate the migration as documented here: Knowledge Base — conda-forge 2024.01.13 documentation.

However, I need to build for Apple Silicon a bit differently than for osx64 - can anyone please advise how one can tell that this is Apple Silicon build in the Makefile (when building in conda-forge)? E.g. is there any environment variable?

Many thanks!

What build system (cmake, poetry, meson, …) is the package using you are building?

@xhochy just a plain Makefile

Any ideas @xhochy ? Very much appreciated!

Yes, you could check the target_architecture environment variable.

Thanks! What would be the value of target_architecture for Apple Silicon? Or more generally, where can see the list of possible values? @xhochy

The value of the architectures used as part of conda, i.e. for Apple Silicon it would be osx-arm64.