For gcc based systems use g++ for linking. This is necessary so that exceptions are propagated between shared libraries. We already use g++ when linking with cmake.

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.
This commit is contained in:
Antony Riakiotakis 2012-08-21 21:01:07 +00:00
parent c92ab5c3ef
commit 59c71eb00a

@ -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'])