[cfe-dev] is it possible to build a completely static clang?

David Tweed David.Tweed at arm.com
Fri Oct 12 02:16:29 PDT 2012


Hi,

Top level question: is it possible to set up a configuration of clang so that it build completely statically-linked programs? (Drivers forking themselves isn't a problem, it's doing any kind of dynamic loading of code). From the optiosn I've tried sticking "-static" and "--enable-static" everywhere this doesn't work.

The reason I want to do this is using gcc's -finstrument-functions in order to trace which functions are being called when, but there are lots of "function addresses" it can't interpret, I think because of magic PLT stuff which would go away in a completely static build.

many thanks,
David 





More information about the cfe-dev mailing list