The std.digest failures turned out to be caused by TargetTransformInfo not being initialized – not sure whether actually requiring it to be present is an LLVM bug or not. David