Add a stub __cxa_demangle to disable LLVM's demangler.
commit0e736a812b7aa3f3e1643929e4d0893122b70989
authorsimonb <simonb@chromium.org>
Tue, 30 Jun 2015 11:34:31 +0000 (30 04:34 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 30 Jun 2015 11:35:00 +0000 (30 11:35 +0000)
treefdf8f4733aec4d46b70a2565cda45a50fc07de38
parent743264e16642fbd60625c86ed9311993074dfda5
Add a stub __cxa_demangle to disable LLVM's demangler.

LLVM's demangler is fairly large and included by default in linked
binaries.  Chromium's demangling happens on host systems when needed,
so demangling code is not required on the target.

Supplying our own stub function stops the linker pulling in the LLVM
demangler from libc++, and reduces the size of libchrome.so accordingly.

Results from a Release build:
  Before:
    $ size --format=SysV out/Release/chrome_apk/libs/armeabi-v7a/libchrome.so
    section                      size       addr
    ...
    .text                    26210064    2237952
    ...
    Total                    35736055
  After:
    $ size --format=SysV out/Release/chrome_apk/libs/armeabi-v7a/libchrome.so
    section                      size       addr
    ...
    .text                    26007820    2237888
    ...
    Total                    35523543

BUG=485154

Review URL: https://codereview.chromium.org/1215673002

Cr-Commit-Position: refs/heads/master@{#336765}
base/BUILD.gn
base/android/cxa_demangle_stub.cc [new file with mode: 0644]
base/base.gypi