How to use lld linker with ghcup ghc on linux to build haskell projects?

On the subject of speed, Stack’s CI was running its integration tests in an Alpine Linux Docker container on Ubuntu using ld.bfd as the linker (having built a statically-linked Stack for Linux).

Changing that to running them on Ubuntu and also specifying lld as the linker has reduced the time they take by a factor of 9.2 times. Some of that may be static v dynamic linking.