Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2014-02-09 21:03:13 +0400
committerJens Verwiebe <info@jensverwiebe.de>2014-02-09 21:03:13 +0400
commita84bcea070a81b9729ada289bd15e1d86881aa70 (patch)
tree7e84b42016c096eac7ca423d1930b4c14c858856 /build_files/scons
parent685c7a2272b95b6514f4fd36b2c72fe6ed5f1a48 (diff)
OSX/scons: allow for compiling with clang-openmp-3.4
See: http://clang-omp.github.io + fix a longstanding bad include in darwin-config
Diffstat (limited to 'build_files/scons')
-rw-r--r--build_files/scons/config/darwin-config.py2
-rw-r--r--build_files/scons/tools/Blender.py11
2 files changed, 12 insertions, 1 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index 09dc32f082a..6a126d47620 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -109,7 +109,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
-BF_ZLIB_INC = '${BF_ZLIB}/include'
+#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = True
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index ac001b5024a..94346b9e9b0 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -266,6 +266,8 @@ def setup_syslibs(lenv):
if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc' and not lenv['WITH_BF_STATICOPENMP']:
if lenv['CC'] == 'cl.exe':
syslibs += ['vcomp']
+ elif lenv['OURPLATFORM']=='darwin' and lenv['C_COMPILER_ID'] == 'clang' and lenv['CCVERSION'] >= '3.4': # clang-omp-3.4 !
+ syslibs += ['iomp5']
else:
syslibs += ['gomp']
if lenv['WITH_BF_ICONV']:
@@ -745,6 +747,15 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
+ if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
+ print "Bundling libiomp5"
+ instname = env['BF_CXX']
+ cmd = 'ditto --arch %s %s/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
+ commands.getoutput(cmd)
+ cmd = 'install_name_tool -id @executable_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
+ commands.getoutput(cmd)
+ cmd = 'install_name_tool -change %s/lib/libiomp5.dylib @executable_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libiomp5 ( blender )
+ commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.