[cfe-dev] [llvm-dev] Why do we static link all llvm libraries in every executable?
David Chisnall via cfe-dev
cfe-dev at lists.llvm.org
Wed Jan 27 01:21:33 PST 2016
On 26 Jan 2016, at 21:32, Yin Ma via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>
> 10x slower..on Linux? If we limit the number of global symbols exposed, it will
> help the situation?
10x slower seems like an exaggeration. I tried doing a shared and non-shared build of LLVM and running the LLVM+Clang test suites. The shared library version used 40% more CPU time[1]. I did not compare to a PIC-but-not-shared-library build yet, which would give another interesting data point (i.e. how much do we lose from PC-relative addresses rather than absolute, vs how much do we lose from dynamic relocations vs static).
David
[1] Note: I only did it once, take these results with a grain of salt, though given that they used several hours of CPU time each, there’s probably not a huge variation expected over multiple runs.
More information about the cfe-dev
mailing list