diff options
Diffstat (limited to 'mesalib/scons/gallium.py')
-rw-r--r-- | mesalib/scons/gallium.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py index 1cdc11cb5..091c74078 100644 --- a/mesalib/scons/gallium.py +++ b/mesalib/scons/gallium.py @@ -596,6 +596,18 @@ def generate(env): libs += ['m', 'pthread', 'dl']
env.Append(LIBS = libs)
+ # OpenMP
+ if env['openmp']:
+ if env['msvc']:
+ env.Append(CCFLAGS = ['/openmp'])
+ # When building openmp release VS2008 link.exe crashes with LNK1103 error.
+ # Workaround: overwrite PDB flags with empty value as it isn't required anyways
+ if env['build'] == 'release':
+ env['PDB'] = ''
+ if env['gcc']:
+ env.Append(CCFLAGS = ['-fopenmp'])
+ env.Append(LIBS = ['gomp'])
+
# Load tools
env.Tool('lex')
env.Tool('yacc')
|