Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#4519 closed feature request (duplicate)

Do not link in unused code

Reported by: gidyn Owned by:
Priority: normal Milestone: 7.4.1
Component: Compiler Version: 7.0.1
Keywords: Cc: michal.terepeta@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

The linker should ignore unused code from imported modules. As an example of where this is a problem, "Hello World" in qtHaskell takes a few minutes to link, and the executable is 76MB.

The current workaround is to import a few individual modules instead of the top-level module. This solution does not scale, as importing modules that require different basic modules will bring in all the dependencies, even if only 1% of each imported module is actually used.

Change History (6)

comment:1 Changed 9 years ago by gidyn

Cc: gideon@… added

comment:2 Changed 9 years ago by michalt

Cc: michal.terepeta@… added

comment:3 Changed 9 years ago by gidyn

Strip can be used to reduce the executable size (although builds then become more complex than a single ghc --make), but aggravates the time issue.

comment:4 Changed 9 years ago by igloo

Milestone: 7.2.1
Type: proposalfeature request

comment:5 Changed 9 years ago by simonmar

Resolution: duplicate
Status: newclosed

Thanks for the report. I think we already have this covered with #4417 and #3252.

comment:6 Changed 7 years ago by gidyn

Cc: gideon@… removed
Note: See TracTickets for help on using tickets.