[LLVMdev] How much memory clang llvm needs for debug compiling?

Eric Christopher echristo at gmail.com
Tue Jun 3 14:16:06 PDT 2014


On Tue, Jun 3, 2014 at 7:59 AM, Nancy <nancydreaming at gmail.com> wrote:
>> First, you could switch to ld.gold instead of ld.bfd. It uses much
>  $ln -s `which gold` /usr/local/bin/ld
>
>> the idea. I think for autoconf you need ".../configure
>> --enable-split-dwarf" to use this.
>>
>  $.../configure --enable-targets=x86 --enable-split-dwarf
>  $ make -j2
>  $ sudo make install
>
> It works for me. Thanks a lot!
>
> I want to use emacs+gdb to trace the code work flow.
> M-x gdb
> Run like gdb --annotate=3 clang
> (gdb) set args test.c
> (gdb) b main
> (gdb) b /home/nancy/work/llvm/tools/clang/lib/Lex/Lexer.cpp:57
> (gdb) r
>  It block at llvm/tools/clang/tools/driver/driver.cpp  main() fucntion.
> (gdb) c
>  program exit normally
>  why? why it not call Lexer.cpp:InitLexer()? And I really can't find
> any entry point to clang/lib/*.cpp files within help of SourceInsight
> code view start from llvm/tools/clang/tools/driver/driver.cpp  main()
> function.
>
> What's wrong with me?
>

You need to use the -cc1 option that clang is being reinvoked with,
use the -v option on your original command line to take a look at it.

Also, if you're just doing development you don't need to install the
binary. The clang in build/Debug+Asserts/bin/clang will work just
fine.

-eric



More information about the llvm-dev mailing list