For gcc based systems use g++ for linking. This is necessary so that exceptions are...
authorAntony Riakiotakis <kalast@gmail.com>
Tue, 21 Aug 2012 21:01:07 +0000 (21:01 +0000)
committerAntony Riakiotakis <kalast@gmail.com>
Tue, 21 Aug 2012 21:01:07 +0000 (21:01 +0000)
This solves crash when trying to render with missing files on MinGW-w64 cycles. The cause was an OpenEXR exception that went uncaught when trying to check the file's extension through OpenImageIO while building the shader tree. Thus my bug-hunting frustration can end with a happy chord.

build_files/scons/tools/Blender.py

index 56d13649cd1b075c4f375b6555f58d186054c8ef..4ab020dc26a36bb11418f80c7bbc9fe23584937d 100644 (file)
@@ -845,6 +845,8 @@ class BlenderEnvironment(SConsEnvironment):
         print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
         lenv = self.Clone()
         lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
+        if lenv['OURPLATFORM'] in ('win32-mingw', 'win64-mingw', 'linuxcross', 'cygwin', 'linux'):
+            lenv.Replace(LINK = '$CXX')
         if lenv['OURPLATFORM'] in ('win32-vc', 'cygwin', 'win64-vc'):
             if lenv['BF_DEBUG']:
                 lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb','/NODEFAULTLIB:libcmt'])