metalangle icon indicating copy to clipboard operation
metalangle copied to clipboard

Build for mac M1?

Open wez opened this issue 2 years ago • 7 comments

Could you add an arm/m1 build for mac to the release downloads?

I was idly looking at building it for myself just now, but the instructions require python2 and I didn't feel like running through getting that installed!

wez avatar Jul 21 '22 04:07 wez

Don't they have already a arm64 slice? At least lipo -info is reporting one

Berstanio avatar Aug 08 '22 15:08 Berstanio

Not for mac:

19:49 wez@mba ~/Downloads/MetalANGLE.dylib.mac
; lipo -info libGLESv2.dylib
Non-fat file: libGLESv2.dylib is architecture: x86_64
19:50 took 11s wez@mba ~/Downloads/MetalANGLE.dylib.mac
; file libGLESv2.dylib
libGLESv2.dylib: Mach-O 64-bit dynamically linked shared library x86_64

wez avatar Aug 10 '22 02:08 wez

Ahh, you are right for the dylib download. Anything speaking against using the framework? This has both slices

Berstanio avatar Aug 10 '22 09:08 Berstanio

Yes, MetalANGLE.framework has both libEGL and libGLESv2 APIs in one package and it has both x86 and arm slices. You could use it if you feel like it. The dylibs are built using google's gn script and atm it doesn't support arm architecture yet (upstream repo might already has a update for this).

kakashidinho avatar Aug 10 '22 10:08 kakashidinho

My application uses cross-platform GL bindings that want to dynamically load libGL, so I can't use the framework version.

wez avatar Aug 10 '22 13:08 wez

The framework in the releases are dynamic librarys too afaik. So couldn't you just dynamically load the the framework? Or extract the dynamic lib from the framework and load that?

Berstanio avatar Aug 10 '22 13:08 Berstanio

Ah, I see, I can copy the framework in and rename it to libEGL.dylib and load it that way

wez avatar Aug 12 '22 01:08 wez