Skip to content

Commit

Permalink
add arm64 arch to support Apple M1
Browse files Browse the repository at this point in the history
- add arch definition
- add rake task to build binary
- update to a universal binary
  • Loading branch information
kevintom committed Mar 2, 2021
1 parent 4f599c6 commit 09bd3fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Binary file modified bin/fsevent_watch
Binary file not shown.
2 changes: 2 additions & 0 deletions ext/fsevent_watch/defines.h
Expand Up @@ -22,6 +22,8 @@
#define TARGET_CPU "i386"
#elif defined(__x86_64__)
#define TARGET_CPU "x86_64"
#elif defined(__arm64__)
#define TARGET_CPU "arm64"
#else
#define TARGET_CPU "unknown"
#endif
Expand Down
5 changes: 5 additions & 0 deletions ext/rakefile.rb
Expand Up @@ -99,6 +99,11 @@
$ARCHFLAGS = '-arch i386'
end

desc 'set build arch to arm64'
task :arm64 do
$ARCHFLAGS = '-arch arm64'
end

task :setup_env => [:set_build_type, :sw_vers, :get_sdk_info]

directory $obj_dir.to_s
Expand Down

0 comments on commit 09bd3fb

Please sign in to comment.