File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
# script should ensure that it is built before running. It looks in this file
5
5
# to see what the expected object file is based on the platform.
6
6
from cffi import FFI
7
- import os
7
+ import os , sysconfig
8
8
import sys
9
9
10
10
ffibuilder = FFI ()
28
28
machine = os .uname ().machine
29
29
# this is a pretty heuristic... but let's go with it anyway.
30
30
# it would be better to get linker information from cmake somehow.
31
- if not ('x86' in machine or 'i386' in machine or 'i686' in machine ):
31
+ # Building process will be broken if add -latomic in Mac with clang. https://github.com/nodejs/node/pull/30099
32
+ clang = False
33
+ try :
34
+ if os .environ ['CC' ] == "clang" :
35
+ clang = True
36
+ except KeyError :
37
+ clang = False
38
+ if sysconfig .get_config_var ('CC' ) == 'clang' :
39
+ clang = True
40
+ if not ('x86' in machine or 'i386' in machine or 'i686' in machine or (clang and 'Darwin' in os .uname ().sysname )):
32
41
libraries .append ('atomic' )
33
42
34
43
You can’t perform that action at this time.
0 commit comments