gn refs列出了哪些目的依赖了目的//:hello
_shared,从上面可以看出目的//:hello
依赖了目的//:hello
_shared,从GN配置文件也可以看出来。
gn desc out //:hello
_shared
Target //:hello
_sharedtype: shared_librarytoolchain: //build/toolchain:gccvisibility *metadata { }testonly falsecheck_includes trueallow_circular_includes_fromsources //hello_shared.cc //hello_shared.hpublic [All headers listed in the sources are public.]configs (in order applying, try also --tree) //build:compiler_defaultsoutputs //out/libhello_shared.socflags -fPIC -pthreaddefines HELLO_SHARED_IMPLEMENTATIONDirect dependencies (try also "--all", "--tree", or even "--all --tree")externs
复制代码
gn desc查看目的//:hello
_shared的所有信息,这个命令非常实用,记载了目的的visibility、metadata、cflags、defines等紧张信息,建议开发者多利用该功能举行调试。