
Fix# 20043 & 20392 The issue is that OSX lib does not implement TLS (Thread Local Storage), so libgomp uses pthread functions to read/write thread specific vars. But this implementation is currently (gcc 4.2) buggy : the write function is called only at lib start (in main thread), and the var is undefined for background thread. The workaround is to perform this gomp_tls_key var write at beginning of background threads that use openMP. (Currently: render & fluidsim)
30 lines
884 B
Python
30 lines
884 B
Python
#!/usr/bin/python
|
|
Import ('env')
|
|
|
|
sources = env.Glob('*.c')
|
|
|
|
incs = '../include ../../blenlib ../../blenkernel ../../blenfont ../../makesdna ../../imbuf'
|
|
incs += ' ../../blenloader ../../windowmanager ../../python ../../makesrna ../../gpu'
|
|
incs += ' ../../render/extern/include'
|
|
incs += ' #/intern/guardedalloc #/extern/glew/include'
|
|
|
|
defs = ''
|
|
|
|
if not env['WITH_BF_PYTHON']:
|
|
defs += 'DISABLE_PYTHON'
|
|
if env['WITH_BF_OPENEXR']:
|
|
defs += ' WITH_OPENEXR'
|
|
|
|
if env['OURPLATFORM'] == 'linux2':
|
|
cflags='-pthread'
|
|
incs += ' ../../../extern/binreloc/include'
|
|
|
|
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
|
|
incs += ' ' + env['BF_PTHREADS_INC']
|
|
|
|
if env['OURPLATFORM'] == 'darwin':
|
|
if env['WITH_BF_OPENMP']:
|
|
defs += ' PARALLEL=1'
|
|
|
|
env.BlenderLib ( 'bf_editors_screen', sources, Split(incs), Split(defs), libtype=['core'], priority=[105] )
|