Skip to content

link executables dynamically to speed up linking#4423

Merged
fendor merged 2 commits into
haskell:masterfrom
develop7:feat-exec_dynamic
Jan 11, 2025
Merged

link executables dynamically to speed up linking#4423
fendor merged 2 commits into
haskell:masterfrom
develop7:feat-exec_dynamic

Conversation

@develop7

@develop7 develop7 commented Oct 12, 2024

Copy link
Copy Markdown
Contributor

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: #2659 seems related, not sure how up-to-date though

@develop7
develop7 marked this pull request as ready for review October 12, 2024 11:35
@develop7
develop7 requested a review from michaelpj as a code owner October 12, 2024 11:35
@fendor

fendor commented Oct 12, 2024

Copy link
Copy Markdown
Collaborator

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.

@fendor
fendor requested a review from wz1000 October 30, 2024 07:24
@fendor fendor added the status: needs review This PR is ready for review label Jan 8, 2025
@wz1000 wz1000 added the merge me Label to trigger pull request merge label Jan 8, 2025
@fendor
fendor merged commit 2df8775 into haskell:master Jan 11, 2025
@fendor

fendor commented Jan 11, 2025

Copy link
Copy Markdown
Collaborator

Thank you for the patience! We appreciate the contribution and the improved test execution times!

@develop7

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Label to trigger pull request merge status: needs review This PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants