mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-28 04:09:35 +03:00
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.
This commit is contained in:
@@ -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
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user