• torne's avatar
    android: don't export unnecessary symbols. · 813edf0d
    torne authored
    Android binaries were relying on -Wl,--exclude-libs=ALL to prevent
    unnecessary symbols from being exported in the final shared libraries
    built in Chromium, however several changes were submitted that actually
    disabled this linker flag in virtually all binaries, and thus it was not
    really being used and many symbols were exported by mistake.
    
    Remove --exclude-libs=ALL entirely from the Android build, as well as
    all the places which were previously having to unset it, and instead
    exclude the specific libraries which incorporate visible symbols that we
    don't want: the NDK libraries which we statically link into the binary,
    and a number of components of chromium which contain assembly code which
    has not yet been fixed to set symbol visibilities correctly.
    
    This reduces the number of exported symbols in the shared libraries to
    only the ones we intended to export, which saves ~120KB binary size.
    
    The GN build does not build the same set of things as static libraries,
    so the list is slightly different there and several more symbols are
    left in the final binaries which shouldn't be there, but are not pulled
    in via a static library and so no --exclude-libs flag will ever fix it;
    the symbol visibilities will need to be fixed at source.
    
    BUG=448386
    TBR=ben@chromium.org
    
    Review URL: https://codereview.chromium.org/806533003
    
    Cr-Commit-Position: refs/heads/master@{#317027}
    813edf0d
native_test.gyp 1.69 KB