From c167d7b79a9f72c4ff24ee0f650e0dfb5fcdb79c Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Fri, 6 Dec 2013 17:06:37 +0100 Subject: =?UTF-8?q?OSX/scons:=20Introduce=20a=20new=20env=20var=20'MACOSX?= =?UTF-8?q?=5FCOMPILER'=20This=20is=20needed=20to=20resolve=20the=20real?= =?UTF-8?q?=20used=20compiler=20from=20the=20compatibility=20shim=E2=80=99?= =?UTF-8?q?S=20or=20symlinks.=20Also=20set=20the=20real=20CCVERSION=20as?= =?UTF-8?q?=20scons=20CCVERSION=20would=20only=20read=20the=20default=20on?= =?UTF-8?q?e,=20which=20is=20not=20useful=20for=20OSX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_files/scons/tools/Blender.py | 2 +- build_files/scons/tools/btools.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'build_files/scons') diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 2cb93c83141..264258527d0 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].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 + if env['MACOSX_COMPILER'] == 'gcc' and env['CCVERSION'] >= '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 diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index f7a5eb8cf06..fd312183df5 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -179,7 +179,7 @@ def validate_arguments(args, bc): 'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS', 'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS', 'C_WARN', 'CC_WARN', 'CXX_WARN', - 'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', + 'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'MACOSX_COMPILER', 'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET' ] @@ -504,6 +504,7 @@ def read_opts(env, cfg, args): ('MACOSX_SDK', 'Set OS X SDK', ''), ('XCODE_CUR_VER', 'Detect XCode version', ''), ('MACOSX_DEPLOYMENT_TARGET', 'Detect OS X target version', ''), + ('MACOSX_COMPILER', 'Detect the resolved compiler', ''), (BoolVariable('BF_PROFILE', 'Add profiling information if true', False)), ('BF_PROFILE_CFLAGS', 'C only profiling flags', []), -- cgit v1.2.3