mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Issue #24421: Compile _math.c separately to avoid race condition
This commit is contained in:
parent
a63897164e
commit
c9deece272
3 changed files with 17 additions and 5 deletions
12
setup.py
12
setup.py
|
@ -582,13 +582,17 @@ class PyBuildExt(build_ext):
|
|||
|
||||
# array objects
|
||||
exts.append( Extension('array', ['arraymodule.c']) )
|
||||
|
||||
shared_math = 'Modules/_math.o'
|
||||
# complex math library functions
|
||||
exts.append( Extension('cmath', ['cmathmodule.c', '_math.c'],
|
||||
depends=['_math.h'],
|
||||
exts.append( Extension('cmath', ['cmathmodule.c'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
libraries=math_libs) )
|
||||
# math library functions, e.g. sin()
|
||||
exts.append( Extension('math', ['mathmodule.c', '_math.c'],
|
||||
depends=['_math.h'],
|
||||
exts.append( Extension('math', ['mathmodule.c'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
libraries=math_libs) )
|
||||
|
||||
# time libraries: librt may be needed for clock_gettime()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue