[PATCH] D83152: llvm-nm: add flag to suppress no symbols warning

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 12:46:54 PDT 2020


rupprecht added a comment.

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.

> 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`)


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