danipen / TextMateSharp

A port of tm4e to bring TextMate grammars to dotnet ecosystem
MIT License
87 stars 15 forks source link

Support apple silicon M1 #35

Closed danipen closed 1 year ago

danipen commented 1 year ago
  1. Compile oniguruma targeting both x86_64 and arm64

    autoreconf -vfi (* case: configure script is not found.) 
    ./configure CC="gcc -arch x86_64 -arch arm64"
    make 
    make install
  2. Compile onigwrap in the following way:

clang -target x86_64-apple-macos10.12 -dynamiclib -L. -lonig -o x86_libonigwrap.dylib onigwrap.c
clang -target arm64-apple-macos11 -dynamiclib -L. -lonig -o arm_libonigwrap.dylib onigwrap.c 
lipo -create -output libonigwrap.dylib x86_libonigwrap.dylib arm_libonigwrap.dylib
  1. Ensure that the library has the correct archs:
    $ lipo -archs libonigwrap.a
    x86_64 arm64