Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support apple silicon M1 #35

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Support apple silicon M1 #35

merged 1 commit into from
Oct 18, 2022

Conversation

danipen
Copy link
Owner

@danipen danipen commented Oct 15, 2022

  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
  1. 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

@danipen danipen changed the title Update libonigwrap.dylib Support apple silicon M1 Oct 15, 2022
@danipen danipen merged commit e9c3d14 into master Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant