diff options
-rw-r--r-- | SConstruct | 8 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct index 197a51f813e..d95811a40d3 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 71585a5f50f..2cb93c83141 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 |