Fix issue #1175: allow WIN32_INSERT_DEF=0 to turn off --output-def in mingw link.
authorgaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 7 Jan 2009 02:44:29 +0000 (02:44 +0000)
committergaryo <garyo@fdb21ef1-2011-0410-befe-b5e4ea1792b1>
Wed, 7 Jan 2009 02:44:29 +0000 (02:44 +0000)
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3877 fdb21ef1-2011-0410-befe-b5e4ea1792b1

src/engine/SCons/Tool/mingw.py

index 8c5e68acb55dab2d27df94904a41e7773e4a9473..a6e44789fdcf93eb90852a33c89ca113c15821bc 100644 (file)
@@ -62,7 +62,8 @@ def shlib_generator(target, source, env, for_signature):
     if implib: cmd.append('-Wl,--out-implib,'+implib.get_string(for_signature))
 
     def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
-    if def_target: cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
+    if env.get("WIN32_INSERT_DEF",1) and def_target: \
+        cmd.append('-Wl,--output-def,'+def_target.get_string(for_signature))
 
     return [cmd]