• Samuel Huang's avatar
    [SuperSize] Hide llvm-nm stderr messages during archive. · d0cc2794
    Samuel Huang authored
    When llvm-nm finds no symbols in an object file (.o file or embedded in
    in .a file) it prints 'no symbols' to stderr. This produces a lot of
    noise when running 'supersize archive' from command line.
    
    This CL makes SuperSize capture stderr for calls to llvm-nm (and nm,
    although it seems to be more quiet). The number of stderr lines (all
    'no symbols' as far as we see), if non-0, is returned by
    nm.RunNmOnIntermediates(), and printed by obj_analyzer._RunNm() as a
    warning.
    
    Change-Id: I2090f8762614d5fc3102f0ec94ef7e83fc305bfd
    Reviewed-on: https://chromium-review.googlesource.com/c/1289989Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
    Reviewed-by: default avataragrieve <agrieve@chromium.org>
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#601031}
    d0cc2794
nm.py 7.06 KB