[PATCH] D83152: llvm-nm: add flag to suppress no symbols warning
Keith Smiley via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 15:08:39 PDT 2020
keith added a comment.
In D83152#2133950 <https://reviews.llvm.org/D83152#2133950>, @rupprecht wrote:
> In D83152#2133855 <https://reviews.llvm.org/D83152#2133855>, @MaskRay wrote:
>
> > I cannot find any search result about `no-warning-for-no-symbols`. Is `-no-warning-for-no-symbols` really an existing option? libtool is an `ar` like tool.
>
>
> I found it by looking for underscores instead of hyphens: `-no_warning_for_no_symbols`.
> However, the flag is an ar/ranlib/libtool flag, not nm, AFAICT.
Yea sorry I should have been more clear, it's not the _exact_ same spelling because of the conventions used in nm with `-` instead of `_`.
>> Second, I wonder how you are going to plug `-no-warning-for-no-symbols` into a build system. If you only parse stdout, you can ignore stderr. Even if you do, you can probably use `grep -v '^no symbols'`. This will have better portability (supported on older nm, supported on other binary formats).
>
> I agree this is likely the simpler option (just add `2> /dev/null` to the build script using `nm`)
If folks feel strongly about this that would definitely work, this felt like a safer way to silence this for the future for me, but if you all think it's not worth adding an option for that's fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83152/new/
https://reviews.llvm.org/D83152
More information about the llvm-commits
mailing list