[llvm] r198087 - Strip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x).

Eric Christopher echristo at gmail.com
Thu Jan 2 20:53:03 PST 2014


Sure, go ahead.

On Thu Jan 02 2014 at 7:03:20 PM, Doug Gilmore <Doug.Gilmore at imgtec.com>
wrote:

> On 12/27/2013 02:39 PM, Nico Weber wrote:
> > Author: nico
> > Date: Fri Dec 27 16:38:59 2013
> > New Revision: 198087
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=198087&view=rev
> > Log:
> > Strip dead code when linking by default with BFD ld (linux, ...) and
> ld64 (os x).
> >
> > This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool
> goes from
> > 21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc.  The size of
> the
> > bin/ folder shrinks from 270 MB to 200 MB.
> >
> > Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE
> > (which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out.
> > ...
> Unfortunately this is causing relocation problems:
>
> http://llvm.org/bugs/show_bug.cgi?id=18360
>
> Is it OK if we apply the following patch until we resolve the issue at
> hand?
>
> Thanks,
>
> Doug
>
> diff --git a/Makefile.rules b/Makefile.rules
> index 1eeadac..9a42f83 100644
> --- a/Makefile.rules
> +++ b/Makefile.rules
> @@ -611,9 +611,12 @@ endif
>  # By default, strip dead symbols at link time
>  ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
>  ifneq ($(HOST_OS),Darwin)
> +# Disabled for Mips until bug 18360 is resolved.
> +ifneq ($(HOST_ARCH),Mips)
>    CXX.Flags += -ffunction-sections -fdata-sections
>  endif
>  endif
> +endif
>  ifndef NO_DEAD_STRIP
>    ifeq ($(HOST_OS),Darwin)
>      LD.Flags += -Wl,-dead_strip
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140103/7222b05d/attachment.html>


More information about the llvm-commits mailing list