Question about LDC and --gc-sections
Kagamin
spam at here.lot
Fri Oct 26 08:43:18 UTC 2018
On Thursday, 25 October 2018 at 17:19:05 UTC, H. S. Teoh wrote:
> Since LDC's libdruntime.a and libphobos2.a already have every
> function in its own section, technically the linker *ought* to
> be able to strip out most of the unreferenced sections.
> However, running the linker with --gc-sections doesn't seem to
> reduce the file size significantly, and many unused sections
> are still present.
IIRC --gc-sections worked fine on executable, on windows I use
llvm-lto tool
https://forum.dlang.org/post/apwqbvaerqgmvnsxlttg@forum.dlang.org
(mostly because --gc-sections doesn't work there), but you need
everything in bitcode form.
More information about the Digitalmars-d
mailing list