SouraVX added a comment. In D70696#1765675 <https://reviews.llvm.org/D70696#1765675>, @yonghong-song wrote:
> @probinson for the question, > > > Does bpf require debug info for the declaration of global_var in noref.c ? > > No, bpf only cares the referenced external global variables. So my current > implementation does not emit debug info > for external global_var in noref.c. > > It is just strange that gcc 7.3.1 (did not test, but maybe later gcc versions > as well) emits the debuginfo (encoded in dwarf) > even if the external variable is not used in the current compilation unit. > Not sure what is the rationale behind it. I'm using gcc 9.2.0 -- it's generating, for `noref.c`{Not used in compilation unit} case also. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70696/new/ https://reviews.llvm.org/D70696 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits