summaryrefslogtreecommitdiffstats
path: root/Source/cmListCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-24 19:01:17 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-24 19:07:05 (GMT)
commit8f56f22b84b52238dca066cc431c6e82f5380fe4 (patch)
tree8c12296ce0853d8d725513b0225f13acbd1b6b20 /Source/cmListCommand.cxx
parent5a0784ddea62ee653a3a1199d4ff2140868d2c1d (diff)
downloadCMake-8f56f22b84b52238dca066cc431c6e82f5380fe4.zip
CMake-8f56f22b84b52238dca066cc431c6e82f5380fe4.tar.gz
CMake-8f56f22b84b52238dca066cc431c6e82f5380fe4.tar.bz2
cmListCommand: Avoid std::function move constructor on aarch64
Since commit 5a0784ddea (clang-tidy: Pass by value, 2019-01-21), some of the `RunCMake.{list,PositionIndependentCode}` cases have crashed on an aarch64 build with GCC 6. Avoiding use of the `std::function` move constructor avoids the crash. Use a strict preprocessor condition to use this workaround only where needed.
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r--Source/cmListCommand.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index 05b22cf..b24c5ba 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -666,7 +666,12 @@ bool cmListCommand::HandleTransformCommand(
ActionDescriptor(std::string name, int arity, transform_type transform)
: Name(std::move(name))
, Arity(arity)
+#if defined(__GNUC__) && __GNUC__ == 6 && defined(__aarch64__)
+ // std::function move constructor miscompiles on this architecture
+ , Transform(transform)
+#else
, Transform(std::move(transform))
+#endif
{
}