aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-26 17:00:11 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-26 17:40:31 +0300
commitd4af9d35ae7099529697467c9b298f031bed1c93 (patch)
treeaf9f7ab4c2a4d69e91120127e735785752fe8328 /libbuild2
parentc69d5dc7a81013647400e055d8c05b12eb545801 (diff)
Try to work around Clang optimization bug
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/test/script/runner.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx
index 3d03bd8..a11ec2c 100644
--- a/libbuild2/test/script/runner.cxx
+++ b/libbuild2/test/script/runner.cxx
@@ -1169,6 +1169,13 @@ namespace build2
size_t ci, size_t li, const location& ll,
bool diag)
{
+ // These are used to be defined much later but there is some
+ // optimization bug in Clang (as of 10.0.0-rc2; see the #45021 bug
+ // report for details).
+ //
+ path osp;
+ fdpipe ofd;
+
if (bc == ec) // End of the pipeline.
return true;
@@ -1516,9 +1523,6 @@ namespace build2
return fd;
};
- path osp;
- fdpipe ofd;
-
// If this is the last command in the pipeline than redirect the
// command process stdout to a file. Otherwise create a pipe and
// redirect the stdout to the write-end of the pipe. The read-end will