diff options
author | Joshua Hughes <joshua.hughes@itron.com> | 2012-07-16 13:27:50 -0400 |
---|---|---|
committer | Joshua Hughes <joshua.hughes@itron.com> | 2012-07-16 13:27:50 -0400 |
commit | b86a08df6edd837314e80763839d9a87c96c0854 (patch) | |
tree | 5fa65fbaeabb6c40da8d4fbe322e04fc4aa3d015 | |
parent | 1cd1b6b55532f8da7d07fc4aae728641d9f32ac7 (diff) | |
download | scons-b86a08df6edd837314e80763839d9a87c96c0854.tar.gz |
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.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/SCons/Tool/mingw.py b/src/engine/SCons/Tool/mingw.py index 5827aae4..83f8c930 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', |