Skip to content

Commit

Permalink
Mac M1 - darwin arm64 supports UCONTEXT passing _xopen_source. We wil…
Browse files Browse the repository at this point in the history
…l use that as it's more production-ready than pthreads (faster too!) and its passing all tests.
  • Loading branch information
renanccastro committed Nov 5, 2021
1 parent 8f28098 commit 6103848
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@
['OS == "solaris" or OS == "sunos" or OS == "freebsd" or OS == "aix"', {'defines': ['CORO_UCONTEXT']}],
['OS == "mac"', {'defines': ['CORO_ASM']}],
['OS == "openbsd"', {'defines': ['CORO_ASM']}],
['target_arch == "arm" or target_arch == "arm64"',
['target_arch == "arm"',
{
# There's been problems getting real fibers working on arm
'defines': ['CORO_PTHREAD'],
'defines!': ['CORO_UCONTEXT', 'CORO_SJLJ', 'CORO_ASM'],
},
],
['target_arch == "arm64"',
{
# There's been problems getting real fibers working on arm
'defines': ['CORO_UCONTEXT', '_XOPEN_SOURCE'],
'defines!': ['CORO_PTHREAD', 'CORO_SJLJ', 'CORO_ASM'],
},
],
],
},
],
Expand Down

0 comments on commit 6103848

Please sign in to comment.