summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Hughes <joshua.hughes@itron.com>2012-07-16 17:27:50 (GMT)
committerJoshua Hughes <joshua.hughes@itron.com>2012-07-16 17:27:50 (GMT)
commit92a1b44d7859e641380171be6b0faf24838fa4b0 (patch)
tree5fa65fbaeabb6c40da8d4fbe322e04fc4aa3d015
parente237baf3f6879945943caf19ff13c15ebcc46434 (diff)
downloadSCons-92a1b44d7859e641380171be6b0faf24838fa4b0.zip
SCons-92a1b44d7859e641380171be6b0faf24838fa4b0.tar.gz
SCons-92a1b44d7859e641380171be6b0faf24838fa4b0.tar.bz2
Fix issue 2856.
This change fixes issue 2856 by making scons consider the .def file only if it's explicitly given or insertion is explicitly requested.
-rw-r--r--src/engine/SCons/Tool/mingw.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/SCons/Tool/mingw.py b/src/engine/SCons/Tool/mingw.py
index 5827aae..83f8c93 100644
--- a/src/engine/SCons/Tool/mingw.py
+++ b/src/engine/SCons/Tool/mingw.py
@@ -100,12 +100,12 @@ def shlib_emitter(target, source, env):
target.append(env.fs.File(targetStrings))
# Append a def file target if there isn't already a def file target
- # or a def file source. There is no option to disable def file
- # target emitting, because I can't figure out why someone would ever
- # want to turn it off.
+ # or a def file source or the user has explicitly asked for the target
+ # to be emitted.
def_source = env.FindIxes(source, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX')
- if not def_source and not def_target:
+ skip_def_insert = env.subst("$WINDOWS_INSERT_DEF") in ['', '0', 0]
+ if not def_source and not def_target and not skip_def_insert:
# Create list of target libraries and def files as strings
targetStrings=env.ReplaceIxes(dll,
'SHLIBPREFIX', 'SHLIBSUFFIX',