File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
12* ~
23* .o
34* .so
Original file line number Diff line number Diff line change 44# script should ensure that it is built before running. It looks in this file
55# to see what the expected object file is based on the platform.
66from cffi import FFI
7- import os
7+ import os , sysconfig
88import sys
99
1010ffibuilder = FFI ()
2828 machine = os .uname ().machine
2929 # this is a pretty heuristic... but let's go with it anyway.
3030 # 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 )):
3241 libraries .append ('atomic' )
3342
3443
You can’t perform that action at this time.
0 commit comments