边学边用边记录
config: Defines a configuration object.
Configuration objects can be applied to targets and specify sets of compiler
flags, includes, defines, etc. They provide a way to conveniently group sets
of this configuration information.
source: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_config
deps: Private linked dependencies.
A list of target labels.
(依赖)
Specifies private dependencies of a target. Private dependencies are
propagated up the dependency tree and linked to dependent targets, but do not
grant the ability to include headers from the dependency. Public configs are
not forwarded.
Data dependencies are propagated differently. See “gn help data_deps” and
“gn help runtime_deps”.
See also “public_deps”.
---- Poisons ----
The general idea is that some targets declare that they contain some
kind of poison, which makes it impossible for other targets to
depend on them (even transitively) unless they declare themselves
immune to that particular type of poison.
Targets that contain poison of type foo should contain the line
poisonous = [ “foo” ]
and targets that are immune but arent’t themselves poisonous
should contain
allow_poison = [ “foo” ]
webrtc自己定义的只有生明了才能编译,外国人真有趣
group 命名
默认会从当前目录下找模块,且下一个group名应该和目录名保持一直,或者用:来命名新的group
src 头文件
作为模块(在deps中声明)引入头文件的时候,只要在 sources =[ ] 中定义了 就可以直接用,并不需要再使用 include_dirs webrtc很多用的绝对目录
build/config/BUILDCONFIG.gn
里面存放了一些config的内容