aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-10-29 22:34:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-10-30 16:13:55 +0300
commit8d08bdafc69870d9fb2b208a31b842382ca4a19e (patch)
tree68375a031e7e47aeb22626a23f24062f9e1c27af
parent9aa7a17926ec853618575da1f2222d216e699767 (diff)
Pass --text option for diff utility on Windows
-rw-r--r--build2/test/rule.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx
index 05f3988..869c23b 100644
--- a/build2/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -774,6 +774,14 @@ namespace build2
args.push_back (dpp.recall_string ());
args.push_back ("-u");
+ // Note that MinGW-built diff utility (as of 3.3) fails trying to
+ // detect if STDIN contains text or binary data. We will help it a bit
+ // to workaround the issue.
+ //
+#ifdef _WIN32
+ args.push_back ("--text");
+#endif
+
// Ignore Windows newline fluff if that's what we are running on.
//
if (cast<target_triplet> (tt["test.target"]).class_ == "windows")