workflow for linking clang

the good news is that (thanks to Simon) the clang driver is working so well for Mips now that we are more or less switching away from using llc during development for all our various host/target configurations.

the bad news is that we have make clang all the time and it is really slow to do that.

we used to be able to just make in the lib/target/Mips and then in llc and it was really fast.

part of it is probably that we have all this debug information that we don't need because none of use are working on clang itself (well, almost never).

ideas?

for 99% of our changes we are just editting files in libc/target/Mips

what is the fastest way to get a new clang complete compiler after that?

tia.

reed

What exactly is slow? I mean, if you're worried about build system
overhead, if you haven't made any changes to clang, you can run "make" in
clang/tools/driver/ . If the issue is really the debug info, I'm not sure
what I can suggest...

-Eli

I find I get the fastest build time by:

a) use CMake+ninja to build, rather than make
b) just do 'ninja clang' to build only the component you want, rather than all of llvm
c) change your system linker to ld.gold rather than ld.bfd

Richard Mitton
richard@codersnotes.com

the initial build is not an issue. it’s the rebuilding so if i do a make in lib/Target/Mips then I should just be able to do a make in the clang/tools/driver directory?

I build a dynamically-linked version of LLVM + clang and it takes about 10 seconds for ninja to rebuild after editing one of the MIPS back end files.

David

someone said that you can't do a make install after that.

how do you deal with that?

Reed

-Eli

Don't really worry about it myself, clang is perfectly usable out of
the build directory.

Also the -gsplit-dwarf stuff speeds up linking on linux quite a bit.

-eric