We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdd2b2c commit 3af3375Copy full SHA for 3af3375
binding.gyp
@@ -6,11 +6,22 @@
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': {
- 'MACOSX_DEPLOYMENT_TARGET': '10.7',
- 'OTHER_CFLAGS': ['-arch x86_64', '-arch arm64'],
- 'OTHER_LDFLAGS': ['-arch x86_64', '-arch arm64']
- }
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
}
0 commit comments