summaryrefslogtreecommitdiff
path: root/engine/SCons/Builder.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:37:46 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:37:46 +0100
commitd54066e296261089c45863f5751e5ec49f4a801e (patch)
tree2668618d1428e6f636d13ff98ee95c79144899ed /engine/SCons/Builder.py
parent5ed7f9cf4e33468b3b75e057db461b30a81febe4 (diff)
parentcd2ab5002aa2359575088bbc3183a9a91cc50c31 (diff)
Update upstream source from tag 'upstream/3.0.1'
Update to upstream version '3.0.1' with Debian dir 34db0131ff56138f3e3a8cd736b32630827891ce
Diffstat (limited to 'engine/SCons/Builder.py')
-rw-r--r--engine/SCons/Builder.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/engine/SCons/Builder.py b/engine/SCons/Builder.py
index 9cb0f86..cf7010d 100644
--- a/engine/SCons/Builder.py
+++ b/engine/SCons/Builder.py
@@ -98,7 +98,7 @@ There are the following methods for internal use within this module:
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/engine/SCons/Builder.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Builder.py 74b2c53bc42290e911b334a6b44f187da698a668 2017/11/14 13:16:53 bdbaddog"
import collections
@@ -291,7 +291,14 @@ def _node_errors(builder, env, tlist, slist):
if t.side_effect:
raise UserError("Multiple ways to build the same target were specified for: %s" % t)
if t.has_explicit_builder():
- if not t.env is None and not t.env is env:
+ # Check for errors when the environments are different
+ # No error if environments are the same Environment instance
+ if (not t.env is None and not t.env is env and
+ # Check OverrideEnvironment case - no error if wrapped Environments
+ # are the same instance, and overrides lists match
+ not (getattr(t.env, '__subject', 0) is getattr(env, '__subject', 1) and
+ getattr(t.env, 'overrides', 0) == getattr(env, 'overrides', 1) and
+ not builder.multi)):
action = t.builder.action
t_contents = t.builder.action.get_contents(tlist, slist, t.env)
contents = builder.action.get_contents(tlist, slist, env)
@@ -300,7 +307,10 @@ def _node_errors(builder, env, tlist, slist):
msg = "Two different environments were specified for target %s,\n\tbut they appear to have the same action: %s" % (t, action.genstring(tlist, slist, t.env))
SCons.Warnings.warn(SCons.Warnings.DuplicateEnvironmentWarning, msg)
else:
- msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents.decode('utf-8'),contents.decode('utf-8'))
+ try:
+ msg = "Two environments with different actions were specified for the same target: %s\n(action 1: %s)\n(action 2: %s)" % (t,t_contents.decode('utf-8'),contents.decode('utf-8'))
+ except UnicodeDecodeError as e:
+ msg = "Two environments with different actions were specified for the same target: %s"%t
raise UserError(msg)
if builder.multi:
if t.builder != builder: