[LLVMdev] memory hog llvm-ld

Duncan Sands baldrick at free.fr
Wed Jul 18 08:38:57 PDT 2007


> This time LLVM did not eat too much memory. I got a nice
> executable.
> 
> 
> $ size main
>    text    data     bss     dec     hex filename
> 1170074   74586    8456 1253116  131efc main
> 
> The same compiled with "g++ (GCC) 4.1.2 20061115 (prerelease)
> (Debian 4.1.1-21)" and "GNU ld version 2.17 Debian GNU/Linux"
> gave me:
> 
> $ size main
>  952074    8572    4528  965174   eba36 main
>
> In the gcc case, I link with "g++", with link options "-Wl,--gc-sections -Wl,-O2 -Wl,--as-needed
> -Wl,--enable-new-dtags -Wl,-s"

You can also give -O options to llvm-ld, from -O0 to -O5.

Ciao,

Duncan.



More information about the llvm-dev mailing list