binding.gyp 802 B

1234567891011121314151617181920212223242526272829
  1. {
  2. 'targets': [
  3. {
  4. 'target_name': 'bufferutil',
  5. 'sources': ['src/bufferutil.c'],
  6. 'cflags': ['-std=c99'],
  7. 'conditions': [
  8. ["OS=='mac'", {
  9. 'variables': {
  10. 'clang_version':
  11. '<!(cc -v 2>&1 | perl -ne \'print $1 if /clang version ([0-9]+(\.[0-9]+){2,})/\')'
  12. },
  13. 'xcode_settings': {
  14. 'MACOSX_DEPLOYMENT_TARGET': '10.7'
  15. },
  16. 'conditions': [
  17. # Use Perl v-strings to compare versions.
  18. ['clang_version and <!(perl -e \'print <(clang_version) cmp 12.0.0\')==1', {
  19. 'xcode_settings': {
  20. 'OTHER_CFLAGS': ['-arch arm64'],
  21. 'OTHER_LDFLAGS': ['-arch arm64']
  22. }
  23. }]
  24. ]
  25. }]
  26. ]
  27. }
  28. ]
  29. }