[df2f604] master: OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5â
Jens Verwiebe
noreply at git.blender.org
Wed Dec 4 23:15:48 CET 2013
Commit: df2f604af27b16d06a54034ea5692f87537eee88
Author: Jens Verwiebe
Date: Wed Dec 4 23:15:29 2013 +0100
http://developer.blender.org/rBdf2f604af27b16d06a54034ea5692f87537eee88
OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5”
===================================================================
M SConstruct
M build_files/scons/tools/Blender.py
===================================================================
diff --git a/SConstruct b/SConstruct
index 197a51f..d95811a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -373,7 +373,9 @@ if env['OURPLATFORM']=='darwin':
#Intel Macs are CoreDuo and Up
if env['MACOSX_ARCHITECTURE'] == 'i386' or env['MACOSX_ARCHITECTURE'] == 'x86_64':
- env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize','-msse','-msse2','-msse3']
+ env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-msse','-msse2','-msse3']
+ if env['XCODE_CUR_VER'] >= '5':
+ env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize'] # clang xcode 4 does not accept flag
else:
env['CCFLAGS'] = env['CCFLAGS']+['-fno-strict-aliasing']
@@ -409,7 +411,7 @@ if env['OURPLATFORM']=='darwin':
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
# if your compiler does not have accurate suffix you may have to enable it by hand !
if env['WITH_BF_OPENMP'] == 1:
- if env['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.6.1':
+ if env['CC'].split('/')[len(env['CC'].split('/'))-1].strip('llvm - gcc clang') >= '4.6.1': # strip down to version string if any
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
print B.bc.OKGREEN + "Using OpenMP"
else:
@@ -419,7 +421,7 @@ if env['OURPLATFORM']=='darwin':
if env['WITH_BF_CYCLES_OSL'] == 1:
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
- if env['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.8':
+ if env['CC'].split('/')[len(env['CC'].split('/'))-1].strip('llvm - gcc clang') >= '4.8': # strip down to version string if any
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-loslexec','-loslquery'])
else:
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 71585a5..2cb93c8 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -730,7 +730,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
commands.getoutput(cmd)
- if env['CC'].split('/')[len(env['CC'].split('/'))-1][4:] >= '4.6.1': # for correct errorhandling with gcc <= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
+ if env['CC'].split('/')[len(env['CC'].split('/'))-1].strip('llvm - gcc clang') >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
print "Bundling libgcc and libgomp"
instname = env['BF_CXX']
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
More information about the Bf-blender-cvs
mailing list