link executables dynamically to speed up linking
Dramatically decreases linking times and shaves 6 of 14G off HLS' dist-newstyle directory on my machine by producing way smaller executables.
While cabal building HLS after switching a branch I've noticed linking test executables takes minutes, plural, each. Then I've checked the size of a freshly-built test binary and it was 150-something megabytes, no wonder linker took a while. With executable-dynamic enabled, linking is lightning fast and binaries are a megabyte at most, which should probably improve the developer experience and decrease the feedback loop time.
UPD: https://github.com/haskell/haskell-language-server/issues/2659 seems related, not sure how up-to-date though
I am not sure what ramification this change might have. @wz1000 or @michaelpj, what do you think? We could also try to enabling it in CI only.
Thank you for the patience! We appreciate the contribution and the improved test execution times!
Thank you for the patience! We appreciate the contribution and the improved test execution times!
Music to my ears! Feedback loop cannot be too short, period.