[PATCH] cmake: Export symbols in all tools that support plugins.

Will Dietz w at wdtz.org
Wed Dec 4 14:56:01 PST 2013


Interesting.

Before this change 'ninja check' takes 1:47 on my machine, after the
patch takes 1:50.
(Minimum of 5 runs, times were pleasantly consistent, "-j1" added to LIT_ARGS)

Note that in Make we presently export symbols in llc and lli, so we
already take this hit on
'make check' when not using CMake.  llvm-stress doesn't currently
export, but it should
(since it supports plugins) but that shouldn't impact the testing use case.

Accordingly IMO a configuration option for managing test times isn't worth it,
but it might be useful for making the installed (stripped) binaries smaller.
If this route is taken, I'd suggest disabling plugin loading in a friendlier
way than removing -export-dynamic and giving undefined reference errors
should a user attempt to load a plugin.

Anyway, updated patch attached to address the inconsistencies.  Okay to commit?

~Will


On Wed, Dec 4, 2013 at 12:58 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> On 4 December 2013 13:49, Reid Kleckner <rnk at google.com> wrote:
>> Can you make sure that this doesn't slow down 'make check' on Linux too
>> much?  I worry that we --export-dynamic for llc, lots of symbol uses will
>> become dynamic PLT lookups and startup time will regress.
>>
>
> Good point. If it does, we should probably add a --enable-plugins (and
> cmake equivalent) and replace CLANG_IS_PRODUCTION with it.
>
> Cheers,
> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Export-symbols-in-tools-that-support-loading-plugins.patch
Type: text/x-patch
Size: 1922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131204/0c87aa7d/attachment.bin>


More information about the llvm-commits mailing list