Thank you for the quick reply, Pavel.
Unfortunately, addition of -DLLVM_TARGETS_TO_BUILD=AArch64 to my cmake 
configuration hasn't reduced the size of resulting binary on a single byte.

-----Original Message-----
From: Pavel Labath [mailto:lab...@google.com] 
Sent: Tuesday, March 1, 2016 12:18 PM
To: Mikhail Filimonov <mfilimo...@nvidia.com>
Cc: lldb-dev@lists.llvm.org
Subject: Re: [lldb-dev] lldb-server stripped binary size: AArch64 ~16Mb vs ARM 
~9 Mb

Hi,

so the problem here is that we are currently relying on the linker to remove 
code that we don't need, and it can't always do a good job in figuring out 
which code is not used due to complex dependencies. So, innocent-looking 
changes in the code can pull in lots of transitive dependencies, even though 
they are not used. I suspect something like that is going on here, although we 
should keep in mind that arm64 code is less dense naturally. Any help on this 
front will be welcome, although it probably won't be trivial, as we have 
probably picked off the low-hanging fruit already.

That said, you may want to try adding LLVM_TARGETS_TO_BUILD=Aarch64 to your 
cmake line. We use that, although I can't say how much it affects the size of 
the resulting binary.

help that helps,
pl

On 29 February 2016 at 20:15, Mikhail Filimonov via lldb-dev 
<lldb-dev@lists.llvm.org> wrote:
> Hello, fellow developers and congratulations with long awaited 3.8 Release.
>
> I wonder why AArch64 stripped binary of lldb-server built from [3.8 Release] 
> RC3 source is so much bigger than its ARM counterpart.
> See the numbers:
> 16318632 Feb 29 22:41 lldb-server-3.8.0-aarch64
>  9570916 Feb 29 22:23 lldb-server-3.8.0-arm
> lldb-server-3.8.0-aarch64: ELF 64-bit LSB  executable, ARM aarch64, version 1 
> (SYSV), statically linked, stripped
> lldb-server-3.8.0-arm:     ELF 32-bit LSB  executable, ARM, EABI5 version 1 
> (SYSV), statically linked, stripped
>
> My build configuration is MinSizeRel in both cases:
> cmake -GNinja
> -DCMAKE_BUILD_TYPE=MinSizeRel $HOME/llvm_git 
> -DCMAKE_TOOLCHAIN_FILE=tools/lldb/cmake/platforms/Android.cmake
> -DANDROID_TOOLCHAIN_DIR=$HOME/Toolchains/aarch64-21-android
> -DANDROID_ABI=aarch64
> -DCMAKE_CXX_COMPILER_VERSION=4.9
> -DLLVM_TARGET_ARCH=aarch64
> -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-android
> -DLLVM_TABLEGEN=$HOME/llvm_host/bin/llvm-tblgen
> -DCLANG_TABLEGEN=$HOME/llvm_host/bin/clang-tblgen
>
> cmake -GNinja
> -DCMAKE_BUILD_TYPE=MinSizeRel $HOME/llvm_git 
> -DCMAKE_TOOLCHAIN_FILE=tools/lldb/cmake/platforms/Android.cmake
> -DANDROID_TOOLCHAIN_DIR=$HOME/Toolchains/arm-21-android-toolchain
> -DANDROID_ABI=armeabi
> -DCMAKE_CXX_COMPILER_VERSION=4.9
> -DLLVM_TARGET_ARCH=arm
> -DLLVM_HOST_TRIPLE=arm-unknown-linux-android
> -DLLVM_TABLEGEN=$HOME/llvm_host/bin/llvm-tblgen
> -DCLANG_TABLEGEN=$HOME/llvm_host/bin/clang-tblgen
>
> Maybe I need some additional settings to be set for AArch64 case?
>
> Regards,
> Mikhail
>
> -----Original Message-----
> From: lldb-dev [mailto:lldb-dev-boun...@lists.llvm.org] On Behalf Of 
> Hans Wennborg via lldb-dev
> Sent: Wednesday, February 24, 2016 12:51 AM
> To: release-test...@lists.llvm.org
> Cc: llvm-dev <llvm-...@lists.llvm.org>; cfe-dev 
> <cfe-...@lists.llvm.org>; openmp-dev (openmp-...@lists.llvm.org) 
> <openmp-...@lists.llvm.org>; LLDB Dev <lldb-dev@lists.llvm.org>
> Subject: [lldb-dev] [3.8 Release] RC3 has been tagged
>
> Dear testers,
>
> Release Candidate 3 has just been tagged [1]. Please build, test, and upload 
> to the sftp.
>
> If there are no regressions from previous release candidates, this will be 
> the last release candidate before the final release.
>
> Release notes can still go into the branch.
>
> Thanks again for all your work!
> Hans
>
>  [1] 
> http://lists.llvm.org/pipermail/llvm-branch-commits/2016-February/0098
> 66.html _______________________________________________
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
> ----------------------------------------------------------------------
> ------------- This email message is for the sole use of the intended 
> recipient(s) and may contain confidential information.  Any 
> unauthorized review, use, disclosure or distribution is prohibited.  
> If you are not the intended recipient, please contact the sender by 
> reply email and destroy all copies of the original message.
> ----------------------------------------------------------------------
> ------------- _______________________________________________
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to