OSX/scons: fix misdesigned version detection of compiler ( todo: do with submodule ), fix a compiler warning with clang < 5”
This commit is contained in:
parent
c6f425c875
commit
df2f604af2
@ -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'])
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user