blender/intern/elbeem/SConscript
Damien Plisson 1975ee5eec OSX vs OpenMP : implement workaround to fix crashes when using mop from a background thread
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)
2009-12-17 17:05:28 +00:00

19 lines
423 B
Python

#!/usr/bin/python
import sys
import os
Import('env')
sources = env.Glob('intern/*.cpp')
defs = 'NOGUI ELBEEM_BLENDER=1'
if env['WITH_BF_OPENMP']:
defs += ' PARALLEL'
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
defs += ' USE_MSVC6FIXES'
incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC']
incs += ' extern '
env.BlenderLib ('bf_elbeem', sources, Split(incs), Split(defs), libtype='intern', priority=0 )